Main Page | Class Hierarchy | Alphabetical List | Compound List | File List | Compound Members | Related Pages

VDKCombo Class Reference

Provides a simplified wrapper for gtkcombo. More...

#include <combo.h>

Inheritance diagram for VDKCombo:

VDKObject VDKNotCopyAble List of all members.

Public Member Functions

Public Attributes


Detailed Description

Provides a simplified wrapper for gtkcombo.

Author:
Eric T. Wienke <eric@liquidsilver.com>
Signals


Constructor & Destructor Documentation

VDKCombo::VDKCombo VDKForm owner,
char *  def = (char *) NULL,
GtkWidget *  combo = NULL
 

Constructor

Parameters:
def is an optional initial value to be shown in the Entrybox.
combo internal use, leave it as NULL.


Member Function Documentation

void VDKCombo::SetBackground VDKRgb  rgb,
GtkStateType  state
[virtual]
 

Sets object background

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

Reimplemented from VDKObject.


Member Data Documentation

VDKReadWriteValueProp<VDKCombo,bool> VDKCombo::CaseSensitive
 

Default: false. Whether the Combo box should check for equality in the list case-sensitive or not.

VDKReadWriteValueProp<VDKCombo,bool> VDKCombo::Editable
 

Same as Editable property in VDKEntry. Setting it to false allows you to provide a read-only list to select from, without the user being able to enter text.

VDKReadWriteValueProp<VDKCombo,bool> VDKCombo::Hidden
 

Entry text visibility flag. (As in VDKEntry)

VDKSignal1<void, int> VDKCombo::OnItemActivate
 

Extended LS signal system: Received when an item is activated

Parameters:
int activated item

VDKSignal1<void,int> VDKCombo::OnItemSelect
 

Extended LS signal system: Received when an item is selected

Parameters:
int selected item

VDKSignal2<void,int, const char*> VDKCombo::OnItemTextChanged
 

Extended LS signal system: Received when an item is changed

Parameters:
int item
char* changed text

VDKSignal1<void,int> VDKCombo::OnItemUnselect
 

Extended LS signal system: Received when an item is unselected

Parameters:
unselected item

VDKReadWriteValueProp<VDKCombo,StringList> VDKCombo::PopdownStrings
 

A StringList corresponding to the Text of the Listitems. Use this function to add items to the list,

    StringList sl = mycombo->PopdownStrings;
    VDKString s("New line");
    sl.add(s);
    mycombo->PopdownStrings = sl;
Since StringList is of type VDKValueList<VDKString> you can use all functions of VDKValueList to manipulate the list. It is very convenient to access the StringList by index:
    int sel = mycombo->Selected;
    char *seltext = (sel == -1) ? "None" : 
           (char*)(mycombo->GetPopdownStrings())[sel];
    printf("Selected item is %s\n",seltext);
Tip
Note the use of the get function GetPopdownStrings() instead of the property because it was used within an expression.
    mycombo->PopdownStrings[sel];
would result in a compilation error. You can however use a typecast:
    ((StringList)mycombo->PopdownStrings)[sel]

VDKReadOnlyValueProp<VDKCombo,int> VDKCombo::Selected
 

Returns the index of the currently selected item in the dropdown list or -1 if no item is selected. See PopdownStrings for example usage.

VDKReadWriteValueProp<VDKCombo,bool> VDKCombo::Sorted
 

Default: false. Setting Sorted to true will automatically sort the listitems alphabetically and maintain the list sorted whenever a new item is added

VDKReadWriteValueProp<VDKCombo,char*> VDKCombo::Text
 

Set/Get the text in the Entry


The documentation for this class was generated from the following files:
Generated on Wed Aug 6 11:01:54 2003 for vdk 2.0.3 by doxygen 1.3.2