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
  • activate_signal received when the Enter key is pressed in the Entry.
  • changed_signal received when text in Entry is changed. This happens when an item has been selected or unselected.
  • focus_in_signal received when Entry gets focus.
  • focus_out_signal received when Entry loses focus.

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  color,
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::SetForeground ( VDKRgb  color,
GtkStateType  state 
) [virtual]

Sets object foreground

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

Reimplemented from VDKObject.

void VDKComboEntry::SetFont ( VDKFont f  )  [virtual]

Sets object font

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,char*> VDKComboEntry::Text

Set/Get the text in the Entry

  • returned char* should be deleted by user

Sets/gets widget dropdown list.

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

VDKReadWriteValueProp<VDKComboEntry,GtkListStore*> VDKComboEntry::StoreModel

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

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


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

Generated on Wed Mar 19 22:40:38 2008 for vdk 2.4.0 by  doxygen 1.5.5