clan::TopLevelWindow Class Reference - ClanLib SDK
Description: clan::TopLevelWindow Class Reference

Public Member Functions | Protected Member Functions | Friends | List of all members
clan::TopLevelWindow Class Reference

`#include <top_level_window.h>`

Inheritance diagram for clan::TopLevelWindow:

## Public Member Functions
| TopLevelWindow (const DisplayWindowDescription &desc)
Canvas | canvas () const override
| Gets the current canvas used to render.
DisplayWindow | display_window () override
void | hide ()
void | immediate_update ()
| Immediately redraws the window.
void | show (WindowShowType type=WindowShowType::show)
Public Member Functions inherited from clan::ViewTree
| ViewTree ()
virtual | ~ViewTree ()
std::shared_ptr< View > | add_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)
View * | focus_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 | TopLevelWindow_Impl

## Constructor & Destructor Documentation

## ◆ TopLevelWindow()

clan::TopLevelWindow::TopLevelWindow | ( | const DisplayWindowDescription & | desc | ) |

## Member Function Documentation

## ◆ canvas()

Canvas clan::TopLevelWindow::canvas | ( |  | ) | const
| overridevirtual

Gets the current canvas used to render.

Implements clan::ViewTree.

## ◆ client_to_screen_pos()

Pointf clan::TopLevelWindow::client_to_screen_pos | ( | const Pointf & | pos | ) |
| overrideprotectedvirtual

Map from client to screen coordinates.

Implements clan::ViewTree.

## ◆ display_window()

DisplayWindow clan::TopLevelWindow::display_window | ( |  | ) |
| overridevirtual

Gets the display window used

This may return a null DisplayWindow

Implements clan::ViewTree.

## ◆ hide()

void clan::TopLevelWindow::hide | ( |  | ) |

## ◆ immediate_update()

void clan::TopLevelWindow::immediate_update | ( |  | ) |

Immediately redraws the window.

## ◆ screen_to_client_pos()

Pointf clan::TopLevelWindow::screen_to_client_pos | ( | const Pointf & | pos | ) |
| overrideprotectedvirtual

Map from screen to client coordinates.

Implements clan::ViewTree.

## ◆ set_needs_render()

void clan::TopLevelWindow::set_needs_render | ( |  | ) |
| overrideprotectedvirtual

Signals that the root view needs to be rendered again.

Implements clan::ViewTree.

## ◆ show()

void clan::TopLevelWindow::show | ( | WindowShowType | type = WindowShowType::show | ) |

## Friends And Related Symbol Documentation

## ◆ TopLevelWindow_Impl

friend class TopLevelWindow_Impl
| friend

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

- top_level_window.h