Go to the documentation of this file.00001
00002 #ifndef bgui_vsol2D_tableau_h_
00003 #define bgui_vsol2D_tableau_h_
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026 #include <vcl_vector.h>
00027
00028 #include <vsol/vsol_spatial_object_2d_sptr.h>
00029 #include <vsol/vsol_point_2d_sptr.h>
00030 #include <vsol/vsol_line_2d_sptr.h>
00031 #include <vsol/vsol_conic_2d_sptr.h>
00032 #include <vsol/vsol_polygon_2d_sptr.h>
00033 #include <vsol/vsol_polyline_2d_sptr.h>
00034 #include <vsol/vsol_poly_set_2d_sptr.h>
00035 #include <vsol/vsol_digital_curve_2d_sptr.h>
00036
00037 #include <vdgl/vdgl_digital_curve_sptr.h>
00038
00039 #include <vgui/vgui_tableau_sptr.h>
00040 #include <vgui/vgui_image_tableau_sptr.h>
00041 #include <vgui/vgui_easy2D_tableau.h>
00042 #include <vgui/vgui_style_sptr.h>
00043
00044 #include "bgui_vsol2D_tableau_sptr.h"
00045
00046 class bgui_vsol_soview2D_point;
00047 class bgui_vsol_soview2D_line_seg;
00048 class bgui_vsol_soview2D_conic_seg;
00049 class bgui_vsol_soview2D_polyline;
00050 class bgui_vsol_soview2D_polygon;
00051 class bgui_vsol_soview2D_polygon_set;
00052 class bgui_vsol_soview2D_digital_curve;
00053 class bgui_vsol_soview2D_edgel_curve;
00054
00055 class bgui_vsol2D_tableau : public vgui_easy2D_tableau
00056 {
00057 public:
00058 bgui_vsol2D_tableau(const char* n="unnamed");
00059
00060 bgui_vsol2D_tableau(vgui_image_tableau_sptr const& it,
00061 const char* n="unnamed");
00062
00063 bgui_vsol2D_tableau(vgui_tableau_sptr const& t,
00064 const char* n="unnamed");
00065
00066 ~bgui_vsol2D_tableau();
00067
00068
00069 vcl_string type_name() const { return "bgui_vsol2D_tableau";}
00070
00071
00072 bgui_vsol_soview2D_point*
00073 add_vsol_point_2d(vsol_point_2d_sptr const& p,
00074 const vgui_style_sptr& style = NULL);
00075
00076
00077 bgui_vsol_soview2D_line_seg*
00078 add_vsol_line_2d(vsol_line_2d_sptr const& line,
00079 const vgui_style_sptr& style = NULL);
00080
00081
00082 bgui_vsol_soview2D_conic_seg*
00083 add_vsol_conic_2d(vsol_conic_2d_sptr const& conic,
00084 const vgui_style_sptr& style = NULL);
00085
00086
00087 bgui_vsol_soview2D_polyline*
00088 add_vsol_polyline_2d(vsol_polyline_2d_sptr const& pline,
00089 const vgui_style_sptr& style = NULL);
00090
00091
00092 bgui_vsol_soview2D_polygon*
00093 add_vsol_polygon_2d(vsol_polygon_2d_sptr const& pline,
00094 const vgui_style_sptr& style = NULL);
00095
00096
00097 bgui_vsol_soview2D_polygon_set*
00098 add_vsol_polygon_2d_set(vsol_poly_set_2d_sptr const& set,
00099 const vgui_style_sptr& style = NULL);
00100
00101
00102 bgui_vsol_soview2D_digital_curve*
00103 add_digital_curve(vsol_digital_curve_2d_sptr const& dc,
00104 const vgui_style_sptr& style = NULL);
00105
00106
00107 bgui_vsol_soview2D_digital_curve*
00108 add_dotted_digital_curve(vsol_digital_curve_2d_sptr const& dc,
00109 const vgui_style_sptr& style = NULL);
00110
00111
00112 bgui_vsol_soview2D_edgel_curve*
00113 add_edgel_curve(vdgl_digital_curve_sptr const& dc,
00114 const vgui_style_sptr& style = NULL);
00115
00116
00117 bgui_vsol_soview2D_edgel_curve*
00118 add_dotted_edgel_curve(vdgl_digital_curve_sptr const& dc,
00119 const vgui_style_sptr& style = NULL);
00120
00121 void add_spatial_object(vsol_spatial_object_2d_sptr const& sos,
00122 const vgui_style_sptr& style = NULL);
00123
00124
00125 void add_spatial_objects(vcl_vector<vsol_spatial_object_2d_sptr> const& sos,
00126 const vgui_style_sptr& style = NULL);
00127
00128
00129
00130 void set_vsol_spatial_object_2d_style(vsol_spatial_object_2d_sptr sos,
00131 const vgui_style_sptr& style);
00132 void set_vsol_point_2d_style(const vgui_style_sptr& style);
00133 void set_vsol_line_2d_style(const vgui_style_sptr& style);
00134 void set_vsol_conic_2d_style(const vgui_style_sptr& style);
00135 void set_vsol_polyline_2d_style(const vgui_style_sptr& style);
00136 void set_digital_curve_style(const vgui_style_sptr& style);
00137 void set_dotted_digital_curve_style(const vgui_style_sptr& style);
00138 void set_edgel_curve_style(const vgui_style_sptr& style);
00139 void set_dotted_edgel_curve_style(const vgui_style_sptr& style);
00140
00141 protected:
00142
00143
00144 vgui_style_sptr point_style_;
00145 vgui_style_sptr line_style_;
00146 vgui_style_sptr conic_style_;
00147 vgui_style_sptr polyline_style_;
00148 vgui_style_sptr digital_curve_style_;
00149 vgui_style_sptr dotted_digital_curve_style_;
00150 vgui_style_sptr edgel_curve_style_;
00151 vgui_style_sptr dotted_edgel_curve_style_;
00152
00153 void init();
00154 };
00155
00156
00157
00158 struct bgui_vsol2D_tableau_new : public bgui_vsol2D_tableau_sptr
00159 {
00160 typedef bgui_vsol2D_tableau_sptr base;
00161
00162 bgui_vsol2D_tableau_new(const char* n="unnamed") :
00163 base(new bgui_vsol2D_tableau(n)) { }
00164 bgui_vsol2D_tableau_new(vgui_image_tableau_sptr const& it,
00165 const char* n="unnamed") :
00166 base(new bgui_vsol2D_tableau(it,n)) { }
00167
00168 bgui_vsol2D_tableau_new(vgui_tableau_sptr const& t, const char* n="unnamed")
00169 : base(new bgui_vsol2D_tableau(t, n)) { }
00170
00171 operator vgui_easy2D_tableau_sptr () const { vgui_easy2D_tableau_sptr tt; tt.vertical_cast(*this); return tt; }
00172 };
00173
00174 #endif // bgui_vsol2D_tableau_h_