combobox.h

Go to the documentation of this file.
00001 
00007 /*
00008     This library is free software; you can redistribute it and/or
00009     modify it under the terms of the GNU Lesser General Public
00010     License as published by the Free Software Foundation; either
00011     version 2.1 of the License, or (at your option) any later version.
00012 
00013     This library is distributed in the hope that it will be useful,
00014     but WITHOUT ANY WARRANTY; without even the implied warranty of
00015     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
00016     Lesser General Public License for more details.
00017 
00018     You should have received a copy of the GNU Lesser General Public
00019     License along with this library; if not, write to the Free Software
00020     Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
00021 
00022     Copyright (C) 2005 Robin McNeill
00023 */
00024 
00025 #ifndef OMGUI_WIN32_COMBOBOX_H
00026 #define OMGUI_WIN32_COMBOBOX_H
00027 
00028 #include <omgui/win32/widget.h>
00029 #include <omgui/common/combobox.h>
00030 #include <omgui/combobox.h>
00031 
00032 namespace omgui {
00033     namespace win32 {
00034 
00035 class ComboBox : public virtual omgui::win32::Widget, public virtual omgui::common::ComboBox
00036 {
00037 private:
00038     bool m_sorted;
00039 
00040 public:
00041     ComboBox(omgui::ComboBox *wrapper = 0);
00042 
00043     void create(const omgui::initializer::ComboBoxData &params);
00044 
00045     bool is_sorted() const;
00046     bool is_editable() const;
00047     void append(const ComboBoxItem &item, bool select);
00048     void prepend(const ComboBoxItem &item, bool select);
00049     void insert(const ComboBoxItem &item, int index, bool select);
00050     void remove(int index);
00051     void clear();
00052     int get_item_count() const;
00053     string get_text() const;
00054     int get_selection() const;
00055     void set_selection(int index);
00056     void clear_selection();
00057     ComboBoxItem get_item(int index) const;
00058     ComboBoxItem get_selected_item() const;
00059 };
00060 
00061     } // win32
00062 } // omgui
00063 
00064 #endif // OMGUI_WIN32_COMBOBOX_H

doxygen SourceForge.net Logo