- // ctor
- wxChoiceBase() { m_clientDataItemsType = ClientData_None; }
-
- // add a new item to the list
- // no client data
- void Append(const wxString& item) { DoAppend(item); }
- // with client data which belongs to the caller
- void Append(const wxString &item, void* clientData)
- { DoAppend(item); SetClientData(GetCount() - 1, clientData); }
- // with client data which will be deleted by the control
- void Append(const wxString &item, wxClientData* clientData)
- { DoAppend(item); SetClientObject(GetCount() - 1, clientData); }
-
- // delete items from the list
- // one item
- virtual void Delete(int n) = 0;
- // all of them
- virtual void Clear() = 0;
-
- // selection (at most one item may be selected in wxChoice)
- // get the index of currently selected item or -1
- virtual int GetSelection() const = 0;
- // get the text of the currently selected item or empty string
- virtual wxString GetStringSelection() const;
-
- // set selectionto current item
- virtual void SetSelection(int n) = 0;
- // set selection to the current item, returns TRUE if ok
- virtual bool SetStringSelection(const wxString& sel);