37 lines
756 B
C++
37 lines
756 B
C++
/* -----------------------------------------------------------------------------
|
|
GSFramework
|
|
Copyright 2001-2013 Emmanuel Julien. All Rights Reserved.
|
|
----------------------------------------------------------------------------- */
|
|
|
|
|
|
#ifndef __NUIWIDGETCANVAS__
|
|
#define __NUIWIDGETCANVAS__
|
|
|
|
|
|
#include "ui/widget_drawable.h"
|
|
|
|
|
|
namespace GS {
|
|
namespace S2D {
|
|
|
|
/*!
|
|
@short Canvas widget.
|
|
@author Emmanuel Julien (ejulien@nworks.fr)
|
|
*/
|
|
struct CanvasWidget : public DrawableWidget
|
|
{
|
|
/// Allocate canvas dimensions.
|
|
bool Allocate(uint width, uint height);
|
|
|
|
Picture *Lock() { return picture; }
|
|
void Unlock() { dirty = true; }
|
|
|
|
CanvasWidget(int id = -1, uint width = 8, uint height = 8);
|
|
};
|
|
|
|
} // S2D
|
|
} // GS
|
|
|
|
|
|
#endif // __NUIWIDGETCANVAS__
|