Go to the documentation of this file.00001
00002 #ifndef vgui_listmanager2D_tableau_h_
00003 #define vgui_listmanager2D_tableau_h_
00004 #ifdef VCL_NEEDS_PRAGMA_INTERFACE
00005 #pragma interface
00006 #endif
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022 #include <vgui/vgui_observable.h>
00023 #include <vgui/vgui_tableau.h>
00024 #include <vgui/vgui_parent_child_link.h>
00025 #include <vgui/vgui_event.h>
00026 #include <vgui/vgui_displaylist2D_tableau.h>
00027 #include <vgui/vgui_listmanager2D_tableau_sptr.h>
00028
00029 class vgui_event;
00030 class vgui_displaylist2D_tableau;
00031 class vgui_soview2D;
00032
00033
00034
00035
00036 class vgui_listmanager2D_tableau : public vgui_tableau
00037 {
00038 public:
00039
00040
00041 vgui_listmanager2D_tableau();
00042
00043
00044 ~vgui_listmanager2D_tableau();
00045
00046
00047 vcl_string type_name() const;
00048
00049
00050 void add(vgui_displaylist2D_tableau_sptr const&);
00051
00052
00053 void remove(vgui_displaylist2D_tableau_sptr const&);
00054
00055
00056 vgui_observable observers;
00057
00058
00059 void set_active(int, bool);
00060
00061
00062 void set_visible(int, bool);
00063
00064
00065 bool is_active(int);
00066
00067
00068 bool is_visible(int);
00069
00070
00071
00072 bool handle(const vgui_event&);
00073
00074
00075 bool help();
00076
00077
00078
00079 bool key_press(int , int , vgui_key key, vgui_modifier);
00080
00081
00082 bool mouse_down(int x, int y, vgui_button button, vgui_modifier modifier);
00083
00084
00085 bool motion(int x, int y);
00086
00087 protected:
00088
00089
00090 bool index_ok(int);
00091
00092
00093 vcl_vector<vgui_parent_child_link> children;
00094 vcl_vector<bool> active;
00095 vcl_vector<bool> visible;
00096
00097 vgui_displaylist2D_tableau_sptr highlight_list;
00098 vgui_soview2D *highlight_so;
00099 vgui_event saved_event_;
00100
00101 vgui_displaylist2D_tableau_sptr contains_hit(vcl_vector<unsigned> const& names);
00102 void get_hits(float x, float y, vcl_vector<vcl_vector<unsigned> >* hits);
00103 void find_closest(float x, float y, vcl_vector<vcl_vector<unsigned> >* hits,
00104 vgui_soview2D** closest_so,
00105 vgui_displaylist2D_tableau_sptr * closest_display);
00106 };
00107
00108
00109 struct vgui_listmanager2D_tableau_new : public vgui_listmanager2D_tableau_sptr
00110 {
00111
00112 vgui_listmanager2D_tableau_new() :
00113 vgui_listmanager2D_tableau_sptr(new vgui_listmanager2D_tableau) { }
00114 };
00115
00116 #endif // vgui_listmanager2D_tableau_h_