Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

VDKObject Class Reference

#include <vdkobj.h>

Inheritance diagram for VDKObject:

VDKNotCopyAble VDKAbstractButton VDKCanvas VDKCombo VDKCustom VDKCustomButton VDKDrawingArea VDKEditor VDKEntry VDKForm VDKImage VDKInputChannel VDKLabel VDKMenuItem VDKObjectContainer VDKOptionMenu VDKPixmap VDKProgressBar VDKSeparator VDKSlider VDKSpinButton VDKStatusbar VDKTimer VDKTooltip VDKTreeView List of all members.

Public Methods

Public Attributes

Protected Attributes

Friends


Detailed Description

This class is the base class of a wide hierarchy, provides common functionalities to all derived classe


Constructor & Destructor Documentation

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.

VDKObject::~VDKObject   [virtual]
 

Destructor


Member Function Documentation

void VDKObject::Add VDKObject *    obj,
int    justify = l_justify,
int    expand = TRUE,
int    fill = TRUE,
int    padding = 0
[virtual]
 

Add on abiect to the object.

Parameters:
obj  the object to be added
justify  where the object wil be added, can be:
  • l_justify packed to end (appended)
  • r_justify packed to start (prepended)
Parameters:
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 VDKBox, VDKEventBox, VDKFixed, VDKForm, VDKFrame, VDKHandleBox, VDKMenu, VDKMenubar, VDKNotebook, VDKPaned, VDKRadioButtonGroup, VDKScrolled, VDKTable, VDKToolbar, and VDKObjectContainer.

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.

Reimplemented in VDKForm.

void VDKObject::Draw GdkRectangle *    area = NULL
 

Draw an object

int VDKObject::EventConnect char *   ,
bool(VDKObject::*   )(VDKObject *, GdkEvent *),
bool    after = false
[inline]
 

Placeholder for subclasses, at this level does nothing. connects an <this>-event to a <this> method

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

int VDKObject::EventConnect VDKObject *    obj,
char *    event,
bool(VDKObject::*    method)(VDKObject *, GdkEvent *),
bool    after = false
[inline]
 

Placeholder for subclasses, at this level does nothing. connects an object-event to a <this> method

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

bool VDKObject::EventDisconnect int    connection [inline]
 

disconnect this from connection

Parameters:
connection  must be achieved with a previous EventConnect() call

VDKRgb VDKObject::GetBackground GtkStateType    state = GTK_STATE_NORMAL
 

Gets object background color

VDKCursorType VDKObject::GetCursor   [inline]
 

Gets object assigned cursor

VDKFont* VDKObject::GetFont   [inline]
 

Gets object font

VDKRgb VDKObject::GetForeground GtkStateType    state = GTK_STATE_NORMAL
 

Gets object foreground color

bool VDKObject::GetVisible   [inline]
 

Returns object visibility

Reimplemented in VDKForm.

void VDKObject::GrabFocus  
 

Grab the focus to itself

virtual int VDKObject::isA   [inline, virtual]
 

returns an enum id (incomplete and not so useful)

Reimplemented in VDKChart, VDKLineChart, VDKScatteredChart, VDKBarChart, and VDKForm.

ItemList& VDKObject::Items   [inline]
 

Return contained objects list

VDKForm* VDKObject::Owner   [inline]
 

Returns object owner form.

Reimplemented in VDKForm.

VDKObject* VDKObject::Parent VDKObject *    p = NULL [inline]
 

Sets object parenthood

void VDKObject::SetBackground VDKRgb    color,
GtkStateType    state = GTK_STATE_NORMAL
[virtual]
 

Sets object background

Parameters:
color  a VDKRgb object
state  can be one of the gtk+ widget states

Reimplemented in VDKCanvas, VDKCombo, VDKEntry, VDKSpinButton, VDKCustom, VDKDrawingArea, VDKEditor, and VDKTextView.

void VDKObject::SetCursor VDKCursorType   
 

Sets object assigned cursor

void VDKObject::SetFont VDKFont   f [virtual]
 

Sets object font

Reimplemented in VDKAbstractButton, VDKCanvas, VDKCheckButton, VDKEntry, VDKMenu, VDKMenuItem, VDKMenubar, VDKOptionMenu, VDKCustom, VDKCustomButton, VDKDrawingArea, VDKEditor, and VDKTextView.

void VDKObject::SetForeground VDKRgb    color,
GtkStateType    state = GTK_STATE_NORMAL
[virtual]
 

Sets object foreground

Parameters:
color  a VDKRgb object
state  can be one of the gtk+ widget states

Reimplemented in VDKAbstractButton, VDKCanvas, VDKCheckButton, VDKEntry, VDKSpinButton, VDKCustom, VDKCustomButton, VDKDrawingArea, VDKEditor, and VDKTextView.

void VDKObject::SetSize int    w,
int    h
[inline]
 

Sets object minimum size

Parameters:
w  width
h  height

void VDKObject::SetTip char *    [virtual]
 

Sets object tip.

Reimplemented in VDKTooltip.

virtual void VDKObject::Setup void    [inline, virtual]
 

placeholder for subclasses. This method is called whenever an object is added to a container.

Reimplemented in VDKFileDialog, VDKFileSel, VDKForm, and VDKFileIconDialog.

void VDKObject::SetUsize VDKPoint    s [inline]
 

Sets object minimum size

Parameters:
s, a  VDKPoint object

void VDKObject::SetVisible bool    visible
 

Set object visibility

Parameters:
visible  either true or false

Reimplemented in VDKForm.

int VDKObject::SignalConnect char *    signal,
bool(VDKObject::*    method)(VDKObject *),
bool    gtk = true,
bool    after = false
[inline]
 

Placeholder for subclasses, at this level does nothing. Connects <this>-signal to a <this> method

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

int VDKObject::SignalConnect VDKObject *    obj,
char *    signal,
bool(VDKObject::*    method)(VDKObject *),
bool    gtk = true,
bool    after = false
[inline]
 

Placeholder for subclasses, at this level does nothing. Connects an object-signal to a <this> method

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

bool VDKObject::SignalDisconnect int    connection [inline]
 

disconnect this from connection

Parameters:
connection  must be achieved with a previous SignalConnect() call

void VDKObject::SignalEmit char *    sig
 

Emit a signal (dynamic tables)

Parameters:
signal 

void VDKObject::SignalEmit int    signal
 

Emit a signal (static tables)

Parameters:
signal 

void VDKObject::SignalEmitParent char *    sig
 

Emit a signal directly to parent (dynamic tables)

Parameters:
signal 

void VDKObject::SignalEmitParent int    signal [inline]
 

Emit a signal directly to parent (static tables)

Parameters:
signal 

GtkWidget * VDKObject::Widget   [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.


Member Data Documentation

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.

VDKReadWriteValueProp<VDKObject,VDKFont*> VDKObject::Font
 

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");

VDKReadWriteValueProp<VDKObject,VDKRgb> VDKObject::NormalBackground
 

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.

VDKObject* VDKObject::parent [protected]
 

Object parent, where the signal flows if not stopped

VDKObjectSignal VDKObject::s_child_attached [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_child_detached [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_clicked [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_enter [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_leave [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_list_click_column [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_list_select [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_list_unselect [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_pressed [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_realize [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_released [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_toggled [protected]
 

stock connected signal

VDKObjectSignal VDKObject::s_value_changed [protected]
 

stock connected signal

GtkWidget* VDKObject::sigwid [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

Reimplemented in VDKForm.

GtkWidget* VDKObject::widget [protected]
 

underlaying gtk+ widget


The documentation for this class was generated from the following files:
Generated on Sat May 4 22:00:28 2002 for vdk 2.0.1 by doxygen1.2.15