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

Provides a notebook widget. More...

#include <notebook.h>

Inheritance diagram for VDKNotebook:
VDKObjectContainer VDKObject VDKNotCopyAble

Public Member Functions

 VDKNotebook (VDKForm *owner=NULL)
virtual ~VDKNotebook ()
void Add (VDKObject *obj, int, int, int, int)
void AddPage (VDKObject *obj, const char *label, char **pixmap_closed=NULL, char **pixmap_open=NULL)
void RemovePage (int page, bool removechild=true)
- Public Member Functions inherited from VDKObjectContainer
int BorderWidth (int w=-1)
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)

Public Attributes

PageList Pages
ActivePageProperty ActivePage
NotebookTabPosProperty TabPosition
VDKReadWriteValueProp
< VDKNotebook, bool > 
Scrollable
VDKReadWriteValueProp
< VDKNotebook, bool > 
PopUp
VDKReadOnlyValueProp
< VDKNotebook, int > 
PreviousActivePage

Additional Inherited Members

- Protected Attributes inherited from VDKObject
VDKObjectSignal s_clicked
GtkWidget * widget
GtkWidget * sigwid
VDKObjectparent

Detailed Description

Provides a notebook widget.

SIGNALS
  • switch_page_signal received whenever user switches between notebook pages.
TIP
Add the notebook to the parent container before adding pages.
EXAMPLES
In ./testvdk/nbookwin.cc

Constructor & Destructor Documentation

VDKNotebook::VDKNotebook ( VDKForm owner = NULL)

Constructor

Parameters
owner
VDKNotebook::~VDKNotebook ( )
virtual

Destructor

Member Function Documentation

void VDKNotebook::Add ( VDKObject obj,
int  ,
int  ,
int  ,
int   
)
inlinevirtual

Add a page containing <obj>

Parameters
obj
othersunused

Reimplemented from VDKObjectContainer.

void VDKNotebook::AddPage ( VDKObject obj,
const char *  label,
char **  pixmap_closed = NULL,
char **  pixmap_open = NULL 
)

Add a page containing <obj>

Parameters
objwidget to be added (normally a container)
labeltab label
pixmap_closed
pixmap_open
TIP
Tabs can show two different pixmaps, opened (when page is selected) or closed (when unselected)
void VDKNotebook::RemovePage ( int  page,
bool  removechild = true 
)

Remove a page from notebook

Parameters
pagepage to be removed
removechildif false page child won't be removed
Tip
Normal user doesn't care about <removechild> arg and let it be <true> as default. Used to better support VDKBuilder notebook handling.

Member Data Documentation

ActivePageProperty VDKNotebook::ActivePage

Sets/gets currently active page

TIP
This property has also increment/decrement operator
book->ActivePage++;
book->ActivePage--;
PageList VDKNotebook::Pages

Return a list of notebook pages You can access to a single page like this:

// disables last page
book->Pages[book->Pages.size()-1]->TabLabel->Enabled = false;

(run-time read only)

VDKReadWriteValueProp<VDKNotebook,bool> VDKNotebook::PopUp

Setting to true enables pop menu on notebook

VDKReadOnlyValueProp<VDKNotebook,int> VDKNotebook::PreviousActivePage

Gets previous active page

VDKReadWriteValueProp<VDKNotebook,bool> VDKNotebook::Scrollable

Sets/gets notebook scrollable flags

NotebookTabPosProperty VDKNotebook::TabPosition

Sets/gets notebook tabs position


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