vdk 2.4.0
Public Member Functions | List of all members
VDKObjectContainer Class Reference

Containers base class. More...

#include <widcontain.h>

Inheritance diagram for VDKObjectContainer:
Inheritance graph
[legend]
Collaboration diagram for VDKObjectContainer:
Collaboration graph
[legend]

Public Member Functions

int BorderWidth (int w=-1)
 
virtual void Add (VDKObject *obj, int justify=l_justify, int expand=TRUE, int fill=TRUE, int padding=0)
 
void RemoveObject (VDKObject *obj)
 
virtual void RemoveObjectFromContainer (VDKObject *obj)
 
void RemoveObjects ()
 
VDKObjectFindTag (int tag)
 
void ForEachDo (void(*action)(VDKObject *))
 
- Public Member Functions inherited from VDKObject
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 ()
 
VDKFormOwner ()
 
virtual GtkWidget * Widget ()
 
GtkWidget * ConnectingWidget ()
 
GtkWidget * WrappedWidget ()
 
virtual void SetFont (VDKFont *f)
 
VDKFontGetFont ()
 
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 *)
 
ItemListItems ()
 
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 ()
 
VDKObjectParent (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)
 

Additional Inherited Members

- Public Attributes inherited from VDKObject
VDKReadWriteValueProp< VDKObject, VDKRgbNormalBackground
 
VDKReadWriteValueProp< VDKObject, VDKFont * > Font
 
SizeObjectProp Usize
 
VDKReadWriteValueProp< VDKObject, bool > Enabled
 
VDKReadWriteValueProp< VDKObject, VDKCursorType > Cursor
 
VDKReadWriteValueProp< VDKObject, bool > Visible
 
- Protected Attributes inherited from VDKObject
VDKObjectSignal s_clicked
 
GtkWidget * widget
 
GtkWidget * sigwid
 
VDKObjectparent
 

Detailed Description

Containers base class.

This class provides a container widget, common class for specialized containers such as VDKBox, VDKTable etc. User should not construct explicitely this kind of object.

Member Function Documentation

◆ Add()

void VDKObjectContainer::Add ( VDKObject obj,
int  justify = l_justify,
int  fill = TRUE,
int  expand = TRUE,
int  padding = 0 
)
virtual

◆ BorderWidth()

int VDKObjectContainer::BorderWidth ( int  w = -1)
inline

Sets container border width

Parameters
wreturns border width if is < 0

◆ FindTag()

VDKObject * VDKObjectContainer::FindTag ( int  tag)

Find an object with Tag==tag, NULL if fails

Parameters
tagvalue to be searched

◆ ForEachDo()

void VDKObjectContainer::ForEachDo ( void(*)(VDKObject *)  action)

Apply user defined functions to each contained object

◆ RemoveObject()

void VDKObjectContainer::RemoveObject ( VDKObject obj)
inline

Remove an object from container, object will be destroyed

Parameters
objobject to be removed

◆ RemoveObjectFromContainer()

void VDKObjectContainer::RemoveObjectFromContainer ( VDKObject obj)
virtual

This function will remove an object from a container without destroying it.

Parameters
objobject to be removed Tip: should be used to reparent an widget, or it will leak. Example:
// remove from source container
// referencing it otherwise will be destroyed by gtk+
source->RemoveObjectFromContainer(widget);
// add to target container
target->Add(widget);
// set target as parent to redirect signal flow
widget->Parent(target);
// unref widget again (or it will leak)
gtk_widget_unref(widget->Widget());

◆ RemoveObjects()

void VDKObjectContainer::RemoveObjects ( )

Remove all objects from container destroying them


The documentation for this class was generated from the following files:
VDKObject::widget
GtkWidget * widget
Definition: vdkobj.h:241