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

VDKComboEntry Class Reference

Provides a simplified wrapper for gtkcombo_entry. More...

#include <vdkcomboentry.h>

Inheritance diagram for VDKComboEntry:

VDKObject VDKNotCopyAble List of all members.

Public Member Functions

Public Attributes


Detailed Description

Provides a simplified wrapper for gtkcombo_entry.

Author:
Mario Motta
Signals


Constructor & Destructor Documentation

VDKComboEntry::VDKComboEntry VDKForm owner,
char **  selections = NULL
 

Constructor

Parameters:
owner owner form
selections a NULL terminating string array


Member Function Documentation

void VDKComboEntry::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.

void VDKComboEntry::SetFont VDKFont font  )  [virtual]
 

Sets object font

Reimplemented from VDKObject.

void VDKComboEntry::SetForeground VDKRgb  rgb,
GtkStateType  state
[virtual]
 

Sets object foreground

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

Reimplemented from VDKObject.


Member Data Documentation

VDKReadWriteValueProp<VDKComboEntry,bool> VDKComboEntry::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<VDKComboEntry,int> VDKComboEntry::Selected
 

Sets/gets the index of the currently selected item in the dropdown list or -1 if no item is selected.

VDKReadWriteValueProp<VDKComboEntry,StringList*> VDKComboEntry::Selections
 

Sets/gets widget dropdown list.

  • setting a new string list overwrites if any
  • returned StringList should be deleted by user

VDKReadWriteValueProp<VDKComboEntry,bool> VDKComboEntry::Sorted
 

Sets underlying GtkListStore model as sortable. Once the model has been sorted, it can't go back to the default state. A possible work around to this problem is here:

bool 
SomeForm::ToggleSorting(VDKObject* sender)
{
  static StringList *unsorted = NULL;
  GtkListStore* store = comboboxentry->StoreModel;
  // store unsorted dropdown list for later use
  if(!unsorted)
    unsorted = comboboxentry->Selections;
  if(chbox->Checked)
      comboboxentry->Sorted = true;
  else
  // since once sorted cannot revert to previous state
  // we substitute store model with a new unsorted one
    {
      comboboxentry->Sorted = false;
      GtkListStore* store = gtk_list_store_new (1, G_TYPE_STRING);
      comboboxentry->StoreModel = store;
      comboboxentry->Selections = unsorted;
    }
  comboboxentry->Selected = 0;
  return true;
}

VDKReadWriteValueProp<VDKComboEntry,GtkSortType> VDKComboEntry::SortingOrder
 

Sets/gets sorting order. Applicable only if Sorted property is true. can be either GTK_SORT_ASCENDING (default) or GTK_SORT_DESCENDING

VDKReadWriteValueProp<VDKComboEntry,GtkListStore*> VDKComboEntry::StoreModel
 

gets underlying GtkListStore model that can be accessed in order to manipulate widget dropdown list if needed.

VDKReadWriteValueProp<VDKComboEntry,char*> VDKComboEntry::Text
 

Set/Get the text in the Entry

  • returned char* should be deleted by user


The documentation for this class was generated from the following files:
Generated on Sat Sep 3 12:10:19 2005 for vdk 2.4.0 by  doxygen 1.4.4