00001 #ifndef OSDL_BACK_BUFFERED_WIDGET_H_
00002 #define OSDL_BACK_BUFFERED_WIDGET_H_
00003
00004
00005 #include "OSDLWidget.h"
00006 #include "OSDLVideoTypes.h"
00007
00008
00009 #include <string>
00010
00011
00012
00013 namespace OSDL
00014 {
00015
00016 namespace Video
00017 {
00018
00019
00020
00021 class Surface ;
00022
00023
00024 namespace TwoDimensional
00025 {
00026
00027
00028
00029 class Point2D ;
00030
00031
00032
00033
00069 class OSDL_DLL BackBufferedWidget : public Widget
00070 {
00071
00072
00073 public:
00074
00075
00132 BackBufferedWidget(
00133 Surface & container,
00134 const Point2D & relativePosition,
00135 Length width,
00136 Length height,
00137 BaseColorMode baseColorMode,
00138 Pixels::ColorDefinition baseColor,
00139 const std::string & title = "",
00140 bool minMaximizable = true,
00141 bool draggable = true,
00142 bool wrappable = true,
00143 bool closable = true )
00144 throw( VideoException ) ;
00145
00146
00148 virtual ~BackBufferedWidget() throw() ;
00149
00150
00171 virtual void resize( Length newWidth, Length newHeight,
00172 bool ignored = false ) throw() ;
00173
00174
00194 virtual void setBaseColorMode(
00195 BaseColorMode newBaseColorMode,
00196 Pixels::ColorDefinition newBaseColor )
00197 throw( VideoException ) ;
00198
00199
00200
00210 virtual void redraw() throw() ;
00211
00212
00221 virtual void redrawInternal() throw() ;
00222
00223
00242 virtual void redrawBackBuffer() throw() ;
00243
00244
00258 Surface & getWidgetRenderTarget() throw() ;
00259
00260
00273 virtual const std::string toString(
00274 Ceylan::VerbosityLevels level = Ceylan::high )
00275 const throw() ;
00276
00277
00278
00279
00280 protected:
00281
00282
00287 virtual void setBackBufferRedrawState(
00288 bool needsToBeRedrawn ) throw() ;
00289
00290
00296 virtual bool getBackBufferRedrawState() const throw() ;
00297
00298
00305 Surface * _overallSurface ;
00306
00307
00308
00309
00310 private:
00311
00312
00313
00323 bool _needsBackBufferRedraw ;
00324
00325
00326
00335 explicit BackBufferedWidget(
00336 const BackBufferedWidget & source ) throw() ;
00337
00338
00347 BackBufferedWidget & operator = (
00348 const BackBufferedWidget & source ) throw() ;
00349
00350
00351 } ;
00352
00353 }
00354
00355 }
00356
00357 }
00358
00359
00360 #endif // OSDL_BACK_BUFFERED_WIDGET_H_