The Gnome Chemistry Utils  0.12.11
Public Types | Public Member Functions
gcp::StringDlg Class Reference

#include <gcp/stringdlg.h>

Inheritance diagram for gcp::StringDlg:
gcu::Dialog gcu::UIBuilder

List of all members.

Public Types

enum  data_type { SMILES, INCHI }

Public Member Functions

 StringDlg (Document *pDoc, std::string &data, enum data_type type)
virtual ~StringDlg ()
bool Apply ()
void Copy ()
void OnGetData (GtkClipboard *clipboard, GtkSelectionData *selection_data, guint info)
- Public Member Functions inherited from gcu::Dialog
 Dialog (Application *App, char const *filename, const char *windowname, char const *domainname, DialogOwner *owner=NULL, void(*extra_destroy)(gpointer)=NULL, gpointer data=NULL) throw (std::runtime_error)
virtual void Destroy ()
void Help ()
GtkWindow * GetWindow ()
void Present ()
void SetTransientFor (GtkWindow *window)
void SetRealName (char const *name, DialogOwner *owner) throw (std::runtime_error)
- Public Member Functions inherited from gcu::UIBuilder
 UIBuilder (char const *filename, char const *domain) throw (std::runtime_error)
virtual ~UIBuilder ()
GtkWidget * GetWidget (char const *wname)
GtkWidget * GetRefdWidget (char const *wname)
GtkComboBox * GetComboBox (char const *cbname)
GtkBuilder * GetBuilder (void) const

Additional Inherited Members

- Protected Member Functions inherited from gcu::Dialog
bool GetNumber (GtkEntry *Entry, double *x, CheckType c=NoCheck, double min=0, double max=0)
- Protected Attributes inherited from gcu::Dialog
GtkWindow * dialog
Applicationm_App

Detailed Description

Represents the dialog used to display the InChI or canonical SMILES of a molecule.

Definition at line 39 of file stringdlg.h.


Member Enumeration Documentation

The string types supported by StringDlg.

Enumerator:
SMILES 

SMILES representation of a molecule.

INCHI 

InChI of a molecule.

Definition at line 45 of file stringdlg.h.


Constructor & Destructor Documentation

gcp::StringDlg::StringDlg ( Document pDoc,
std::string &  data,
enum data_type  type 
)
Parameters:
pDocthe document owning the dialog.
datathe string to display.
typethe type of the data.

Builds a dialog showing the string and display it. type is used to select an appropriate title for the dialog box.

virtual gcp::StringDlg::~StringDlg ( )
virtual

The destructor.


Member Function Documentation

bool gcp::StringDlg::Apply ( )
virtual

Called by the framework to save the string to a file upon user request.

Reimplemented from gcu::Dialog.

void gcp::StringDlg::Copy ( )

Called by the framework when the user clicks the "Copy" button.

void gcp::StringDlg::OnGetData ( GtkClipboard *  clipboard,
GtkSelectionData *  selection_data,
guint  info 
)
Parameters:
clipboardthe clipboard requesting the data.
selection_datathe GtkSelectionData to which the string should be copied.
infothe type of data requested. Unused since only ASCII strings are supported.

Called by the framework to get the actual data for the clipboard.


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