#include <texture_window.h>

+ Inheritance diagram for clan::TextureWindow:

Public Member Functions

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

Protected Member Functions

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

Friends

class TextureWindow_Impl
 

Constructor & Destructor Documentation

◆ TextureWindow()

clan::TextureWindow::TextureWindow ( Canvas & canvas)

Member Function Documentation

◆ canvas()

Canvas clan::TextureWindow::canvas ( ) const
overridevirtual

Gets the current canvas used to render.

Implements clan::ViewTree.

◆ client_to_screen_pos()

Pointf clan::TextureWindow::client_to_screen_pos ( const Pointf & pos)
overrideprotectedvirtual

Map from client to screen coordinates.

Implements clan::ViewTree.

◆ display_window()

DisplayWindow clan::TextureWindow::display_window ( )
overridevirtual

Gets the display window used

This may return a null DisplayWindow

Implements clan::ViewTree.

◆ on_got_focus()

void clan::TextureWindow::on_got_focus ( )

◆ on_key_down()

void clan::TextureWindow::on_key_down ( const clan::InputEvent & )

◆ on_key_up()

void clan::TextureWindow::on_key_up ( const clan::InputEvent & )

◆ on_lost_focus()

void clan::TextureWindow::on_lost_focus ( )

◆ on_mouse_dblclk()

void clan::TextureWindow::on_mouse_dblclk ( const clan::InputEvent & )

◆ on_mouse_down()

void clan::TextureWindow::on_mouse_down ( const clan::InputEvent & )

◆ on_mouse_move()

void clan::TextureWindow::on_mouse_move ( const clan::InputEvent & )

◆ on_mouse_up()

void clan::TextureWindow::on_mouse_up ( const clan::InputEvent & )

◆ on_window_close()

void clan::TextureWindow::on_window_close ( )

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

◆ screen_to_client_pos()

Pointf clan::TextureWindow::screen_to_client_pos ( const Pointf & pos)
overrideprotectedvirtual

Map from screen to client coordinates.

Implements clan::ViewTree.

◆ set_always_render()

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

Always redraw the entire gui.

◆ set_background_color()

void clan::TextureWindow::set_background_color ( const Colorf & background_color = StandardColorf::transparent())

◆ set_clear_background()

void clan::TextureWindow::set_clear_background ( bool enable = true)

◆ set_needs_render()

void clan::TextureWindow::set_needs_render ( )
overrideprotectedvirtual

Signals that the root view needs to be rendered again.

Implements clan::ViewTree.

◆ set_viewport()

void clan::TextureWindow::set_viewport ( const Rectf & rect)

Set position and size within the canvas.

Parameters
rect= position and size.

◆ set_window()

void clan::TextureWindow::set_window ( const DisplayWindow & 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

◆ update()

void clan::TextureWindow::update ( )

◆ viewport()

Rectf clan::TextureWindow::viewport ( ) const

Returns the position and size within the canvas.

Friends And Related Symbol Documentation

◆ TextureWindow_Impl

friend class TextureWindow_Impl
friend

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