Main Page   Namespace List   Class Hierarchy   Compound List   File List   Compound Members   File Members  

selection_list.h

Go to the documentation of this file.
00001 /*
00002         ClanGUI, copyrights by various people. Have a look in the CREDITS file.
00003         
00004         This sourcecode is distributed using the Library GNU Public Licence,
00005         version 2 or (at your option) any later version. Please read LICENSE
00006         for details.
00007 */
00008 
00009 #ifndef header_selection_list
00010 #define header_selection_list
00011 
00012 #include "API/GUI/component.h"
00013 #include "API/GUI/component_options.h"
00014 #include "API/GUI/stylemanager.h"
00015 #include "API/GUI/stylemanager_default.h"
00016 
00017 class CL_Font;
00018 class CL_Scrollbar;
00019 
00020 class CL_SelectionList : public CL_Component
00021 {
00022 public:
00023         CL_SelectionList(
00024                 const CL_ComponentOptions &options,
00025                 CL_Component *parent,
00026                 CL_StyleManager_Default *style,
00027                 CL_Font *font,
00028                 const std::list<std::string> &selection_list);
00029 
00030         virtual ~CL_SelectionList() { ; }
00031 
00032         void cancel();
00033 
00034         CL_Signal_v1<int> sig_activated;
00035         CL_Signal_v0 sig_cancelled;
00036 
00037 private:
00038         void on_paint();
00039         void on_key_down(CL_Component *comp, CL_InputDevice *device, CL_Key key);
00040         void on_mouse_move(CL_Component *comp, CL_InputDevice *device, int x, int y);
00041 
00042         CL_Slot slot_paint, slot_key_down, slot_moouse_move;
00043         
00044         CL_StyleManager_Default *style;
00045         CL_Font *font;
00046         int highlighted_option;
00047 
00048         bool has_scrollbar;
00049         unsigned int max_height;
00050         int scroll_offset;
00051         void on_scroll_change(int new_offset);
00052         CL_Scrollbar *scrollbar;
00053 
00054         std::list<std::string> selection_list;
00055 };
00056 
00057 #endif

Generated at Wed Apr 4 19:54:03 2001 for ClanLib by doxygen1.2.6 written by Dimitri van Heesch, © 1997-2001