#include <texture_window.h>

+ Inheritance diagram for uicore::TextureWindow:

Public Member Functions

 TextureWindow (const CanvasPtr &canvas)
 
CanvasPtr canvas () const override
 Gets the current canvas used to render. More...
 
DisplayWindowPtr display_window () override
 
void on_got_focus ()
 
void on_key_down (const uicore::InputEvent &)
 
void on_key_up (const uicore::InputEvent &)
 
void on_lost_focus ()
 
void on_mouse_dblclk (const uicore::InputEvent &)
 
void on_mouse_down (const uicore::InputEvent &)
 
void on_mouse_move (const uicore::InputEvent &)
 
void on_mouse_up (const uicore::InputEvent &)
 
void on_window_close ()
 User defined events. Call these if set_event_window() is not used. More...
 
void set_always_render (bool enable=true)
 Always redraw the entire gui. More...
 
void set_background_color (const Colorf &background_color=Colorf::transparent)
 
void set_clear_background (bool enable=true)
 
void set_viewport (const Rectf &rect)
 Set position and size within the canvas. More...
 
void set_window (const DisplayWindowPtr &window, bool enable_automatic_events=true, const Mat4f &transform_mouse_matrix=Mat4f::identity())
 Set the window that will contain this canvas-> More...
 
void update ()
 
Rectf viewport () const
 Returns the position and size within the canvas. More...
 
- Public Member Functions inherited from uicore::ViewTree
 ViewTree ()
 
virtual ~ViewTree ()
 
void add_child (const std::shared_ptr< View > &view)
 Add a child view. More...
 
template<typename T , typename... Types>
std::shared_ptr< T > add_child (Types &&...args)
 
std::shared_ptr< Viewadd_child ()
 
Viewfocus_view () const
 The view receiving keyboard events or nullptr if no view has the focus. More...
 
const std::shared_ptr< View > & root_view () const
 Retrieves the root of the view tree. More...
 
void set_root_view (std::shared_ptr< View > root_view)
 Sets a new root view controller for the view tree. More...
 

Protected Member Functions

Pointf client_to_screen_pos (const Pointf &pos) override
 Map from client to screen coordinates. More...
 
Pointf screen_to_client_pos (const Pointf &pos) override
 Map from screen to client coordinates. More...
 
void set_needs_render () override
 Signals that the root view needs to be rendered again. More...
 
- Protected Member Functions inherited from uicore::ViewTree
void dispatch_activation_change (ActivationChangeType type)
 Dispatch activation change event to all views. More...
 
void render (const CanvasPtr &canvas, const Rectf &margin_box)
 Renders view into the specified canvas. More...
 
void set_focus_view (View *view)
 Set or clears the focus. More...
 

Friends

class TextureWindow_Impl
 

Constructor & Destructor Documentation

uicore::TextureWindow::TextureWindow ( const CanvasPtr canvas)

Member Function Documentation

CanvasPtr uicore::TextureWindow::canvas ( ) const
overridevirtual

Gets the current canvas used to render.

Implements uicore::ViewTree.

Pointf uicore::TextureWindow::client_to_screen_pos ( const Pointf pos)
overrideprotectedvirtual

Map from client to screen coordinates.

Implements uicore::ViewTree.

DisplayWindowPtr uicore::TextureWindow::display_window ( )
overridevirtual

Gets the display window used

This may return a null DisplayWindow

Implements uicore::ViewTree.

void uicore::TextureWindow::on_got_focus ( )
void uicore::TextureWindow::on_key_down ( const uicore::InputEvent )
void uicore::TextureWindow::on_key_up ( const uicore::InputEvent )
void uicore::TextureWindow::on_lost_focus ( )
void uicore::TextureWindow::on_mouse_dblclk ( const uicore::InputEvent )
void uicore::TextureWindow::on_mouse_down ( const uicore::InputEvent )
void uicore::TextureWindow::on_mouse_move ( const uicore::InputEvent )
void uicore::TextureWindow::on_mouse_up ( const uicore::InputEvent )
void uicore::TextureWindow::on_window_close ( )

User defined events. Call these if set_event_window() is not used.

Pointf uicore::TextureWindow::screen_to_client_pos ( const Pointf pos)
overrideprotectedvirtual

Map from screen to client coordinates.

Implements uicore::ViewTree.

void uicore::TextureWindow::set_always_render ( bool  enable = true)

Always redraw the entire gui.

void uicore::TextureWindow::set_background_color ( const Colorf background_color = Colorf::transparent)
void uicore::TextureWindow::set_clear_background ( bool  enable = true)
void uicore::TextureWindow::set_needs_render ( )
overrideprotectedvirtual

Signals that the root view needs to be rendered again.

Implements uicore::ViewTree.

void uicore::TextureWindow::set_viewport ( const Rectf rect)

Set position and size within the canvas.

Parameters
rect= position and size.
void uicore::TextureWindow::set_window ( const DisplayWindowPtr window,
bool  enable_automatic_events = true,
const Mat4f transform_mouse_matrix = Mat4f::identity() 
)

Set the window that will contain this canvas->

This is used to set the mouse cursor and send events

Parameters
event_window= The window to use
enable_automatic_events= Automatically control the window events, passing to the on_...() functions
transform_mouse_matrix= Transform the mouse coordinates when enable_automatic_events is true
void uicore::TextureWindow::update ( )
Rectf uicore::TextureWindow::viewport ( ) const

Returns the position and size within the canvas.

Friends And Related Function Documentation

friend class TextureWindow_Impl
friend

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