The Gnome Chemistry Utils  0.13.7
Public Member Functions | Protected Attributes
gcugtk::Chem3dApplication Class Reference

#include <gcugtk/chem3dapplication.h>

Inheritance diagram for gcugtk::Chem3dApplication:
gcugtk::Application gcu::Application gcu::DialogOwner

List of all members.

Public Member Functions

 Chem3dApplication (gcu::Display3DMode display3d=gcu::BALL_AND_STICK, char const *bg="black")
virtual ~Chem3dApplication ()
virtual Chem3dDocOnFileNew ()=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

Detailed Description

Application class for the molecule 3d viewer.

Definition at line 41 of file chem3dapplication.h.


Constructor & Destructor Documentation

gcugtk::Chem3dApplication::Chem3dApplication ( gcu::Display3DMode  display3d = gcu::BALL_AND_STICK,
char const *  bg = "black" 
)
Parameters:
display3dthe default display mode for the application.
bgthe default background color name, accetpted values are "white", "black", and "#rrggbb". Defaults to 'black'.

The constructor.

Default destructor.


Member Function Documentation

bool gcugtk::Chem3dApplication::FileProcess ( const gchar *  filename,
const gchar *  mime_type,
bool  bSave,
GtkWindow *  window,
gcu::Document pDoc = NULL 
)
Parameters:
filenamethe uri of the file.
mime_typethe mime type of the file if known.
bSavetrue if saving, and false if loading.
windowthe current top level window.
pDocan optional document.

Called by the FileChooser when a file name has been selected. Saves or loads the document according to bSave.

Returns:
true if no error occured.
Returns:
the current blue component of the default background color.

Definition at line 127 of file chem3dapplication.h.

Returns:
the current default display mode.

Definition at line 106 of file chem3dapplication.h.

Returns:
the current green component of the default background color.

Definition at line 120 of file chem3dapplication.h.

gcugtk::Chem3dApplication::GetRed ( void  ) [inline]
Returns:
the current red component of the default background color.

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.

Returns:
the newly created document.
Parameters:
doca 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.

Called when the user selects the 'Quit' menu item.

Parameters:
docthe 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.


Member Data Documentation

The current blue component of the default background color.

Definition at line 127 of file chem3dapplication.h.

The current default display mode.

Definition at line 106 of file chem3dapplication.h.

The current green component of the default background color.

Definition at line 120 of file chem3dapplication.h.

The current red component of the default background color.

Definition at line 113 of file chem3dapplication.h.


The documentation for this class was generated from the following file: