vdk 2.4.0
|
#include <vdkobj.h>
Public Member Functions | |
VDKRgb | GetBackground (GtkStateType state=GTK_STATE_NORMAL) |
VDKRgb | GetForeground (GtkStateType state=GTK_STATE_NORMAL) |
VDKObject (VDKForm *owner=NULL) | |
VDKObject (VDKForm *owner, GtkWidget *widget) | |
virtual | ~VDKObject () |
bool | Destroy () |
virtual int | isA () |
VDKForm * | Owner () |
virtual GtkWidget * | Widget () |
GtkWidget * | ConnectingWidget () |
GtkWidget * | WrappedWidget () |
virtual void | SetFont (VDKFont *f) |
VDKFont * | GetFont () |
void | SetVisible (bool visible) |
bool | GetVisible () |
void | SetCursor (VDKCursorType) |
VDKCursorType | GetCursor () |
virtual void | SetForeground (VDKRgb color, GtkStateType state=GTK_STATE_NORMAL) |
virtual void | SetBackground (VDKRgb color, GtkStateType state=GTK_STATE_NORMAL) |
void | SetSize (int w, int h) |
void | SetUsize (VDKPoint s) |
virtual void | SetTip (char *) |
virtual void | Add (VDKObject *obj, int justify=l_justify, int expand=TRUE, int fill=TRUE, int padding=0) |
ItemList & | Items () |
void | Draw (GdkRectangle *area=NULL) |
virtual void | Setup () |
void | SignalEmit (int signal) |
void | SignalEmit (char *sig) |
void | SignalEmitParent (int signal) |
void | SignalEmitParent (char *sig) |
void | GrabFocus () |
VDKObject * | Parent (VDKObject *p=NULL) |
int | SignalConnect (VDKObject *obj, char *signal, bool(VDKObject::*method)(VDKObject *), bool gtk=true, bool after=false) |
int | SignalConnect (char *signal, bool(VDKObject::*method)(VDKObject *), bool gtk=true, bool after=false) |
bool | SignalDisconnect (int connection) |
int | EventConnect (VDKObject *obj, char *event, bool(VDKObject::*method)(VDKObject *, GdkEvent *), bool after=false) |
int | EventConnect (char *, bool(VDKObject::*)(VDKObject *, GdkEvent *), bool after=false) |
bool | EventDisconnect (int connection) |
Public Attributes | |
VDKReadWriteValueProp < VDKObject, VDKRgb > | NormalBackground |
VDKReadWriteValueProp < VDKObject, VDKFont * > | Font |
SizeObjectProp | Usize |
VDKReadWriteValueProp < VDKObject, bool > | Enabled |
VDKReadWriteValueProp < VDKObject, VDKCursorType > | Cursor |
VDKReadWriteValueProp < VDKObject, bool > | Visible |
Protected Attributes | |
VDKObjectSignal | s_clicked |
GtkWidget * | widget |
GtkWidget * | sigwid |
VDKObject * | parent |
Friends | |
class | VDKRawObject |
This class is the base class of a wide hierarchy, provides common functionalities to all derived classe
VDKObject::VDKObject | ( | VDKForm * | owner = NULL | ) |
Constructor, make an object that belongs to <owner> form.
VDKObject::VDKObject | ( | VDKForm * | owner, |
GtkWidget * | widget | ||
) |
Contructor, makes an object instance from an already gtk+ created object.
|
virtual |
Destructor
|
virtual |
Add on abiect to the object.
obj | the object to be added |
justify | where the object wil be added, can be:
|
expand | if true object will expand |
fill | if true object will fill all available space |
padding | how many pixels are left around object |
Reimplemented in VDKForm, VDKMenubar, VDKNotebook, VDKToolbar, VDKRadioButtonGroup, VDKFrame, VDKMenu, VDKTable, VDKScrolled, VDKBox, VDKHandleBox, VDKPaned, VDKObjectContainer, VDKFixed, and VDKEventBox.
GtkWidget * VDKObject::ConnectingWidget | ( | ) |
Same as WrappedWidget().
bool VDKObject::Destroy | ( | ) |
Explicitely destroy an object freeing associated memory.
Tip: never use delete operator otherwise garbage collection will fail and program probably will crash.
void VDKObject::Draw | ( | GdkRectangle * | area = NULL | ) |
Draw an object
|
inline |
Placeholder for subclasses, at this level does nothing. connects an object-event to a <this> method
obj | connected object |
event | event to be connected |
method | class method that answers to signal |
after | (default is false) if set to true connect signal in the "after" slot. |
|
inline |
Placeholder for subclasses, at this level does nothing. connects an <this>-event to a <this> method
event | event to be connected |
method | class method that answers to signal |
after | (default is false) if set to true connect signal in the "after" slot. |
|
inline |
disconnect this from connection
connection | must be achieved with a previous EventConnect() call |
VDKRgb VDKObject::GetBackground | ( | GtkStateType | state = GTK_STATE_NORMAL | ) |
Gets object background color
|
inline |
Gets object assigned cursor
|
inline |
Gets object font
VDKRgb VDKObject::GetForeground | ( | GtkStateType | state = GTK_STATE_NORMAL | ) |
Gets object foreground color
|
inline |
Returns object visibility
void VDKObject::GrabFocus | ( | ) |
Grab the focus to itself
|
inlinevirtual |
returns an enum id (incomplete and not so useful)
Reimplemented in VDKBarChart, VDKScatteredChart, VDKLineChart, VDKChart, and VDKForm.
|
inline |
Return contained objects list
|
inline |
Returns object owner form.
|
virtual |
Sets object background
color | a VDKRgb object |
state | can be one of the gtk+ widget states |
Reimplemented in VDKDrawingArea, VDKDataBox, VDKTextView, VDKCustom, VDKCombo, VDKComboEntry, VDKSpinButton, VDKEditor, VDKEntry, and VDKCanvas.
void VDKObject::SetCursor | ( | VDKCursorType | curType | ) |
Sets object assigned cursor
|
virtual |
Sets object font
Reimplemented in VDKOptionMenu, VDKCustom, VDKDrawingArea, VDKMenubar, VDKTextView, VDKMenuItem, VDKCustomButton, VDKComboEntry, VDKEditor, VDKEntry, VDKCanvas, VDKCheckButton, VDKMenu, and VDKAbstractButton.
|
virtual |
Sets object foreground
color | a VDKRgb object |
state | can be one of the gtk+ widget states |
Reimplemented in VDKCustom, VDKDrawingArea, VDKTextView, VDKCustomButton, VDKComboEntry, VDKEditor, VDKSpinButton, VDKEntry, VDKCanvas, VDKCheckButton, and VDKAbstractButton.
|
inline |
Sets object minimum size
w | width |
h | height |
|
virtual |
Sets object tip.
Reimplemented in VDKTooltip.
|
inlinevirtual |
placeholder for subclasses. This method is called whenever an object is added to a container.
Reimplemented in VDKForm, VDKFileDialog, VDKFileChooser, VDKHLButton, VDKFileSel, and VDKFileIconDialog.
|
inline |
Sets object minimum size
s,a | VDKPoint object |
void VDKObject::SetVisible | ( | bool | visible | ) |
Set object visibility
visible | either true or false |
|
inline |
Placeholder for subclasses, at this level does nothing. Connects an object-signal to a <this> method
obj | connected object |
signal | signal to be connected |
method | class method that answers to signal |
gtk | (default is true) if you set this arg to false no real connection is made with gtk+ signal system and signal is handled internally by vdk. This allow to define and use your own signals without register them to gtk+ |
after | (default is false) if set to true connect signal in the "after" slot, meaninigfull only if previous <gtk> arg is set to true. |
|
inline |
Placeholder for subclasses, at this level does nothing. Connects <this>-signal to a <this> method
signal | signal to be connected |
method | class method that answers to signal |
gtk | (default is true) if you set this arg to false no real connection is made with gtk+ signal system and signal is handled internally by vdk. This allow to define and use your own signals without register them to gtk+ |
after | (default is false) if set to true connect signal in the "after" slot, meaninigfull only if previous <gtk> arg is set to true. |
|
inline |
disconnect this from connection
connection | must be achieved with a previous SignalConnect() call |
void VDKObject::SignalEmit | ( | int | signal | ) |
Emit a signal (static tables)
signal |
void VDKObject::SignalEmit | ( | char * | sig | ) |
Emit a signal (dynamic tables)
signal |
|
inline |
Emit a signal directly to parent (static tables)
signal |
void VDKObject::SignalEmitParent | ( | char * | sig | ) |
Emit a signal directly to parent (dynamic tables)
signal |
|
virtual |
Returns underlying GTK+ widget.
GtkWidget * VDKObject::WrappedWidget | ( | ) |
Returns underlying wrapped Gtk+ widget, useful in those cases when VDKObject is a composite one. Happens in many composite widgets, i.e a container with some inner widgets, that underlaying widget isn't which answers to signals. In this case the container is the <widget> and one of the inner widgets is the <sigwid>, wich is responsible to answers signal/event.You have to connect with the last one. An example is VDKText where Widget() return packing box not text itself. Tip: In doubt use always WrappedWidget() instead of Widget(), is always safer.
VDKReadWriteValueProp<VDKObject,VDKCursorType> VDKObject::Cursor |
Setting this property will set/get object cursor type.
VDKReadWriteValueProp<VDKObject,bool> VDKObject::Enabled |
Setting this property will set/get object sensitivity.
Setting this property will set the object font.
i.e.: obj->Font = new VDKFont(obj,"X-font-string-chock-full-o-dashes-goes-in-here");
Setting one of these this properties will set/get object background color. Naming convention follows Gtk+ one. Example: form->NormalBackground = VDKRgb(255,0,0); (Tip: VDKRgb is a structure defined in vdkutils.h. Remember that some objects are transparent, so if you want to set the background color, you actually have to set the background color of the parent, VDKLabel is an example.
|
protected |
Object parent, where the signal flows if not stopped
|
protected |
stock connected signal
|
protected |
underlaying gtk+ widget widget and sigwid could be different, e.g into composite widget made of a container with some inner widget. See Widget() and WrappedWidget()
SizeObjectProp VDKObject::Usize |
Setting this property will set/get object minimum size.
VDKReadWriteValueProp<VDKObject,bool> VDKObject::Visible |
Setting this property will show/hide or get object visibility
|
protected |
underlaying gtk+ widget