The Gnome Chemistry Utils
0.13.7
|
#include <gcugtk/chem3dapplication.h>
Public Member Functions | |
Chem3dApplication (gcu::Display3DMode display3d=gcu::BALL_AND_STICK, char const *bg="black") | |
virtual | ~Chem3dApplication () |
virtual Chem3dDoc * | OnFileNew ()=0 |
void | OnFileOpen (Chem3dDoc *doc) |
void | OnSaveAsImage (Chem3dDoc *doc) |
bool | FileProcess (const gchar *filename, const gchar *mime_type, bool bSave, GtkWindow *window, gcu::Document *pDoc=NULL) |
void | OnQuit () |
gcu::Display3DMode | GetDisplay3D (void) |
float | GetRed (void) |
float | GetGreen (void) |
float | GetBlue (void) |
Protected Attributes | |
gcu::Display3DMode | m_Display3D |
float | m_Red |
float | m_Green |
float | m_Blue |
Application class for the molecule 3d viewer.
Definition at line 41 of file chem3dapplication.h.
gcugtk::Chem3dApplication::Chem3dApplication | ( | gcu::Display3DMode | display3d = gcu::BALL_AND_STICK , |
char const * | bg = "black" |
||
) |
display3d | the default display mode for the application. |
bg | the default background color name, accetpted values are "white", "black", and "#rrggbb". Defaults to 'black'. |
The constructor.
virtual gcugtk::Chem3dApplication::~Chem3dApplication | ( | ) | [virtual] |
Default destructor.
bool gcugtk::Chem3dApplication::FileProcess | ( | const gchar * | filename, |
const gchar * | mime_type, | ||
bool | bSave, | ||
GtkWindow * | window, | ||
gcu::Document * | pDoc = NULL |
||
) |
filename | the uri of the file. |
mime_type | the mime type of the file if known. |
bSave | true if saving, and false if loading. |
window | the current top level window. |
pDoc | an optional document. |
Called by the FileChooser when a file name has been selected. Saves or loads the document according to bSave.
gcugtk::Chem3dApplication::GetBlue | ( | void | ) | [inline] |
Definition at line 127 of file chem3dapplication.h.
gcugtk::Chem3dApplication::GetDisplay3D | ( | void | ) | [inline] |
Definition at line 106 of file chem3dapplication.h.
gcugtk::Chem3dApplication::GetGreen | ( | void | ) | [inline] |
Definition at line 120 of file chem3dapplication.h.
gcugtk::Chem3dApplication::GetRed | ( | void | ) | [inline] |
Definition at line 113 of file chem3dapplication.h.
virtual Chem3dDoc* gcugtk::Chem3dApplication::OnFileNew | ( | ) | [pure virtual] |
Pure virtual function used to create a new document of the appropriate type.
void gcugtk::Chem3dApplication::OnFileOpen | ( | Chem3dDoc * | doc | ) |
doc | a Chem3dDoc |
Displays a file open dialog and when a file is selected, loads it's contents inside doc if it's empty or inside a nex document.
void gcugtk::Chem3dApplication::OnQuit | ( | ) |
Called when the user selects the 'Quit' menu item.
void gcugtk::Chem3dApplication::OnSaveAsImage | ( | Chem3dDoc * | doc | ) |
doc | the document to save as an image. |
Displays a file selctor and saves the image insode the selected file if any. The framework will ask the user to overwrite or not if the file already exists.
gcugtk::Chem3dApplication::m_Blue [protected] |
The current blue component of the default background color.
Definition at line 127 of file chem3dapplication.h.
gcugtk::Chem3dApplication::m_Display3D [protected] |
The current default display mode.
Definition at line 106 of file chem3dapplication.h.
gcugtk::Chem3dApplication::m_Green [protected] |
The current green component of the default background color.
Definition at line 120 of file chem3dapplication.h.
gcugtk::Chem3dApplication::m_Red [protected] |
The current red component of the default background color.
Definition at line 113 of file chem3dapplication.h.