Btk
Btk::Canvas Class Reference
Inheritance diagram for Btk::Canvas:
Collaboration diagram for Btk::Canvas:

Public Types

typedef Function< void(Renderer &)> DrawFn
 
typedef Function< bool(Event &)> EventFn
 

Public Member Functions

 Canvas (Container &)
 
 Canvas (Container &, int x, int y, int w, int h)
 
 Canvas (const Canvas &)=delete
 
void draw (Renderer &)
 
bool handle (Event &)
 Process event. More...
 
EventFnhandle ()
 
DrawFndraw ()
 
- Public Member Functions inherited from Btk::Widget
 Widget ()
 Construct a new Widget object. More...
 
 Widget (Container *parent)
 
 Widget (Container &parent)
 
 Widget (const Widget &)=delete
 
bool visible () const noexcept
 
Vec2 position () const noexcept
 
Windowmaster () const
 Return The widget's master. More...
 
void set_rect (const Rect &rect)
 
void set_rect (int x, int y, int w, int h)
 
void set_position (const Vec2 &vec2)
 
int x () const noexcept
 
int y () const noexcept
 
int w () const noexcept
 
int h () const noexcept
 
bool is_enable () const noexcept
 
- Public Member Functions inherited from Btk::HasSlots
 HasSlots (const HasSlots &)=delete
 
void disconnect_all ()
 

Additional Inherited Members

- Public Attributes inherited from Btk::HasSlots
std::list< Connection_connections
 
- Protected Member Functions inherited from Btk::Widget
void redraw ()
 Send a redraw request to the window. More...
 
WindowImplwindow () const noexcept
 Get current window. More...
 
- Protected Attributes inherited from Btk::Widget
WidgetAttr attr
 
Rect rect
 
Containerparent
 

Member Function Documentation

◆ handle()

bool Btk::Canvas::handle ( Event ev)
virtual

Process event.

Returns
true if widget processed it
false if widget unprocessed it

Reimplemented from Btk::Widget.


The documentation for this class was generated from the following files: