gcp::Tool Class Reference

List of all members.

Public Member Functions

bool OnClicked (View *pView, Object *pObject, double x, double y, unsigned int state)
string & GetName ()
void OnKeyPressed (unsigned int code)
void OnKeyReleased (unsigned int code)
virtual char const * GetHelpTag ()

Protected Attributes

gdouble m_x0
gdouble m_y0
gdouble m_x1
gdouble m_y1
gdouble m_x
gdouble m_y
Objectm_pObject
Objectm_pObjectGroup
Viewm_pView
WidgetDatam_pData
Dialogm_OptionDialog
GtkWidget * m_pWidget
GnomeCanvasGroup * m_pGroup
GnomeCanvasItem * m_pItem
GnomeCanvasItem * m_pBackground
double m_dZoomFactor
bool m_bChanged
bool m_bPressed
unsigned int m_nState
gcp::Applicationm_pApp
set< string > ModifiedObjects
bool m_bAllowed

Detailed Description

Definition at line 42 of file tool.h.


Member Function Documentation

bool gcp::Tool::OnClicked ( View pView,
Object pObject,
double  x,
double  y,
unsigned int  state 
)

Parameters:
pView the view instance owning the event.
pObject the Object on which the click occured.
x the horizontal position of the mouse when the click occured.
y the vertical position of the mouse when the click occured.
state a bit-mask representing the state of the modifier keys (e.g. Control, Shift and Alt) and the pointer buttons. See GdkModifierType in GDK documentation.
This method is called by the framework when the tool is active and a click occurs. It initialize some members and the calls the virtual OnClicked() method. It might be called to simulate a click in some instances (e.g. from a contextual menu handler).

Returns:
true if the mouse drag and button release evens are significative for this tool in the current context, false otherwise. If true, a mouse move will fire the OnDrag method, and a button release will result in an OnRelease call. If false, nothing happens for these events.


Member Data Documentation

bool gcp::Tool::m_bAllowed [protected]

if true, the intended operation is allowed. Default value is true, each tool must set this flag to false if necessary.

Definition at line 114 of file tool.h.


The documentation for this class was generated from the following file:
Generated on Thu Jun 28 09:02:03 2007 for The Gnome Chemistry Utils by  doxygen 1.5.2