00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027 #ifndef OSDL_BACK_BUFFERED_WIDGET_H_
00028 #define OSDL_BACK_BUFFERED_WIDGET_H_
00029
00030
00031 #include "OSDLWidget.h"
00032 #include "OSDLVideoTypes.h"
00033
00034
00035 #include <string>
00036
00037
00038
00039
00040 namespace OSDL
00041 {
00042
00043
00044 namespace Video
00045 {
00046
00047
00048
00049
00050 class Surface ;
00051
00052
00053
00054 namespace TwoDimensional
00055 {
00056
00057
00058
00059
00060 class Point2D ;
00061
00062
00063
00064
00100 class OSDL_DLL BackBufferedWidget : public Widget
00101 {
00102
00103
00104 public:
00105
00106
00107
00164 BackBufferedWidget(
00165 Surface & container,
00166 const Point2D & relativePosition,
00167 Length width,
00168 Length height,
00169 BaseColorMode baseColorMode,
00170 Pixels::ColorDefinition baseColor,
00171 const std::string & title = "",
00172 bool minMaximizable = true,
00173 bool draggable = true,
00174 bool wrappable = true,
00175 bool closable = true ) ;
00176
00177
00178
00180 virtual ~BackBufferedWidget() throw() ;
00181
00182
00183
00204 virtual void resize( Length newWidth, Length newHeight,
00205 bool ignored = false ) ;
00206
00207
00208
00228 virtual void setBaseColorMode(
00229 BaseColorMode newBaseColorMode,
00230 Pixels::ColorDefinition newBaseColor ) ;
00231
00232
00233
00243 virtual void redraw() ;
00244
00245
00246
00255 virtual void redrawInternal() ;
00256
00257
00258
00277 virtual void redrawBackBuffer() ;
00278
00279
00280
00294 Surface & getWidgetRenderTarget() ;
00295
00296
00297
00310 virtual const std::string toString(
00311 Ceylan::VerbosityLevels level = Ceylan::high ) const ;
00312
00313
00314
00315
00316
00317 protected:
00318
00319
00320
00325 virtual void setBackBufferRedrawState(
00326 bool needsToBeRedrawn ) ;
00327
00328
00329
00335 virtual bool getBackBufferRedrawState() const ;
00336
00337
00338
00345 Surface * _overallSurface ;
00346
00347
00348
00349
00350
00351 private:
00352
00353
00354
00364 bool _needsBackBufferRedraw ;
00365
00366
00367
00376 explicit BackBufferedWidget(
00377 const BackBufferedWidget & source ) ;
00378
00379
00380
00389 BackBufferedWidget & operator = (
00390 const BackBufferedWidget & source ) ;
00391
00392
00393 } ;
00394
00395
00396 }
00397
00398 }
00399
00400 }
00401
00402
00403
00404 #endif // OSDL_BACK_BUFFERED_WIDGET_H_
00405