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

Public Member Functions | List of all members
clan::DisplayWindowProvider Class Referenceabstract
clanDisplay Display

Interface for implementing a DisplayWindow target. More...

`#include <display_window_provider.h>`

## Public Member Functions
virtual | ~DisplayWindowProvider ()
virtual void | bring_to_front ()=0
| Raise window on top of other windows.
virtual void | capture_mouse (bool capture)=0
| Capture/Release the mouse.
virtual Point | client_to_screen (const Point &client)=0
| Convert from window client coordinates to screen coordinates.
virtual void | create (DisplayWindowSite *site, const DisplayWindowDescription &description)=0
| Creates window, assigning site and description to provider.
virtual CursorProvider * | create_cursor (const CursorDescription &cursor_description)=0
| Creates a new custom cursor.
virtual void | enable_alpha_channel (const Rect &blur_rect)=0
virtual void | extend_frame_into_client_area (int left, int top, int right, int bottom)=0
virtual void | flip (int interval)=0
| Flip the window display buffers.
virtual PixelBuffer | get_clipboard_image () const =0
| Returns the image stored in the clipboard.
virtual std::string | get_clipboard_text () const =0
| Returns the text stored in the clipboard.
virtual std::vector< InputDevice > & | get_game_controllers ()=0
| Returns the game controller input device.
virtual GraphicContext & | get_gc ()=0
| Returns the graphic context for the window.
virtual Rect | get_geometry () const =0
| Returns the position and size of the window frame.
virtual DisplayWindowHandle | get_handle () const =0
virtual InputDevice & | get_keyboard ()=0
| Returns the keyboard input device.
virtual Size | get_maximum_size (bool client_area) const =0
| Returns the maximum size of the window.
virtual Size | get_minimum_size (bool client_area) const =0
| Returns the minimum size of the window.
virtual InputDevice & | get_mouse ()=0
| Returns the mouse input device.
virtual float | get_pixel_ratio () const =0
virtual std::string | get_title () const =0
| Returns the maximum size of the window.
virtual Rect | get_viewport () const =0
| Returns the drawable area of the window.
virtual bool | has_focus () const =0
| Returns true if window has focus.
virtual void | hide ()=0
| Hides the window.
virtual void | hide_system_cursor ()=0
| Hides the mouse cursor.
virtual bool | is_clipboard_image_available () const =0
| Returns true if an image is available in the clipboard.
virtual bool | is_clipboard_text_available () const =0
| Returns true if text is available in the clipboard.
virtual bool | is_fullscreen () const =0
| Returns true if the window is fullscreen.
virtual bool | is_maximized () const =0
| Returns true if the window is maximized.
virtual bool | is_minimized () const =0
| Returns true if the window is minimized.
virtual bool | is_visible () const =0
| Returns true if the window is visible.
virtual void | maximize ()=0
| Maximizes the window.
virtual void | minimize ()=0
| Minimizes the window.
virtual void | request_repaint ()=0
| Invalidates the screen, causing a repaint.
virtual void | restore ()=0
| Restores the window.
virtual Point | screen_to_client (const Point &screen)=0
| Convert from screen coordinates to client coordinates.
virtual void | set_clipboard_image (const PixelBuffer &buf)=0
| Stores an image in the clipboard.
virtual void | set_clipboard_text (const std::string &text)=0
| Stores text in the clipboard.
virtual void | set_cursor (CursorProvider *cursor)=0
| Sets the current cursor icon.
virtual void | set_cursor (StandardCursor type)=0
| Sets the current cursor icon.
virtual void | set_enabled (bool enable)=0
| Enables or disables input into this window.
virtual void | set_large_icon (const PixelBuffer &image)=0
| Sets the large icon used for this window.
virtual void | set_maximum_size (int width, int height, bool client_area)=0
virtual void | set_minimum_size (int width, int height, bool client_area)=0
virtual void | set_pixel_ratio (float ratio)=0
virtual void | set_position (const Rect &pos, bool client_area)=0
| Sets the position and size of this window on the screen.
virtual void | set_size (int width, int height, bool client_area)=0
virtual void | set_small_icon (const PixelBuffer &image)=0
| Sets the small icon used for this window.
virtual void | set_title (const std::string &new_title)=0
| Change window title.
virtual void | show (bool activate)=0
| Displays the window in its current size and position.
virtual void | show_system_cursor ()=0
| Shows the mouse cursor.
virtual void | toggle_fullscreen ()=0

## Detailed Description

Interface for implementing a DisplayWindow target.

## Constructor & Destructor Documentation

## ◆ ~DisplayWindowProvider()

virtual clan::DisplayWindowProvider::~DisplayWindowProvider | ( |  | ) |
| inlinevirtual

## Member Function Documentation

## ◆ bring_to_front()

virtual void clan::DisplayWindowProvider::bring_to_front | ( |  | ) |
| pure virtual

Raise window on top of other windows.

## ◆ capture_mouse()

virtual void clan::DisplayWindowProvider::capture_mouse | ( | bool | capture | ) |
| pure virtual

Capture/Release the mouse.

## ◆ client_to_screen()

virtual Point clan::DisplayWindowProvider::client_to_screen | ( | const Point & | client | ) |
| pure virtual

Convert from window client coordinates to screen coordinates.

## ◆ create()

virtual void clan::DisplayWindowProvider::create | ( | DisplayWindowSite * | site,
|  | const DisplayWindowDescription & | description )
| pure virtual

Creates window, assigning site and description to provider.

## ◆ create_cursor()

virtual CursorProvider * clan::DisplayWindowProvider::create_cursor | ( | const CursorDescription & | cursor_description | ) |
| pure virtual

Creates a new custom cursor.

## ◆ enable_alpha_channel()

virtual void clan::DisplayWindowProvider::enable_alpha_channel | ( | const Rect & | blur_rect | ) |
| pure virtual

Enable alpha channel blending for this window.

Note
  This is only supported on Windows Vista and above. You can use layered windows to achieve the same effect on systems that do not support this.

Parameters

  blur_rect | Window blur area. If its size is 0, the area of the entire window will be used.

## ◆ extend_frame_into_client_area()

virtual void clan::DisplayWindowProvider::extend_frame_into_client_area | ( | int | left,
|  | int | top,
|  | int | right,
|  | int | bottom )
| pure virtual

Extend the window frame into the client area.

Note
  This is only applicable in Windows.

## ◆ flip()

virtual void clan::DisplayWindowProvider::flip | ( | int | interval | ) |
| pure virtual

Flip the window display buffers.

## ◆ get_clipboard_image()

virtual PixelBuffer clan::DisplayWindowProvider::get_clipboard_image | ( |  | ) | const
| pure virtual

Returns the image stored in the clipboard.

## ◆ get_clipboard_text()

virtual std::string clan::DisplayWindowProvider::get_clipboard_text | ( |  | ) | const
| pure virtual

Returns the text stored in the clipboard.

## ◆ get_game_controllers()

virtual std::vector< InputDevice > & clan::DisplayWindowProvider::get_game_controllers | ( |  | ) |
| pure virtual

Returns the game controller input device.

## ◆ get_gc()

virtual GraphicContext & clan::DisplayWindowProvider::get_gc | ( |  | ) |
| pure virtual

Returns the graphic context for the window.

## ◆ get_geometry()

virtual Rect clan::DisplayWindowProvider::get_geometry | ( |  | ) | const
| pure virtual

Returns the position and size of the window frame.

## ◆ get_handle()

virtual DisplayWindowHandle clan::DisplayWindowProvider::get_handle | ( |  | ) | const
| pure virtual

Returns an platform-specific internal display window handle object.

## ◆ get_keyboard()

virtual InputDevice & clan::DisplayWindowProvider::get_keyboard | ( |  | ) |
| pure virtual

Returns the keyboard input device.

## ◆ get_maximum_size()

virtual Size clan::DisplayWindowProvider::get_maximum_size | ( | bool | client_area | ) | const
| pure virtual

Returns the maximum size of the window.

## ◆ get_minimum_size()

virtual Size clan::DisplayWindowProvider::get_minimum_size | ( | bool | client_area | ) | const
| pure virtual

Returns the minimum size of the window.

## ◆ get_mouse()

virtual InputDevice & clan::DisplayWindowProvider::get_mouse | ( |  | ) |
| pure virtual

Returns the mouse input device.

## ◆ get_pixel_ratio()

virtual float clan::DisplayWindowProvider::get_pixel_ratio | ( |  | ) | const
| pure virtual

Returns the display pixel ratio of the window. \seealso Resolution Independence

## ◆ get_title()

virtual std::string clan::DisplayWindowProvider::get_title | ( |  | ) | const
| pure virtual

Returns the maximum size of the window.

## ◆ get_viewport()

virtual Rect clan::DisplayWindowProvider::get_viewport | ( |  | ) | const
| pure virtual

Returns the drawable area of the window.

## ◆ has_focus()

virtual bool clan::DisplayWindowProvider::has_focus | ( |  | ) | const
| pure virtual

Returns true if window has focus.

## ◆ hide()

virtual void clan::DisplayWindowProvider::hide | ( |  | ) |
| pure virtual

Hides the window.

## ◆ hide_system_cursor()

virtual void clan::DisplayWindowProvider::hide_system_cursor | ( |  | ) |
| pure virtual

Hides the mouse cursor.

## ◆ is_clipboard_image_available()

virtual bool clan::DisplayWindowProvider::is_clipboard_image_available | ( |  | ) | const
| pure virtual

Returns true if an image is available in the clipboard.

## ◆ is_clipboard_text_available()

virtual bool clan::DisplayWindowProvider::is_clipboard_text_available | ( |  | ) | const
| pure virtual

Returns true if text is available in the clipboard.

## ◆ is_fullscreen()

virtual bool clan::DisplayWindowProvider::is_fullscreen | ( |  | ) | const
| pure virtual

Returns true if the window is fullscreen.

## ◆ is_maximized()

virtual bool clan::DisplayWindowProvider::is_maximized | ( |  | ) | const
| pure virtual

Returns true if the window is maximized.

## ◆ is_minimized()

virtual bool clan::DisplayWindowProvider::is_minimized | ( |  | ) | const
| pure virtual

Returns true if the window is minimized.

## ◆ is_visible()

virtual bool clan::DisplayWindowProvider::is_visible | ( |  | ) | const
| pure virtual

Returns true if the window is visible.

## ◆ maximize()

virtual void clan::DisplayWindowProvider::maximize | ( |  | ) |
| pure virtual

Maximizes the window.

## ◆ minimize()

virtual void clan::DisplayWindowProvider::minimize | ( |  | ) |
| pure virtual

Minimizes the window.

## ◆ request_repaint()

virtual void clan::DisplayWindowProvider::request_repaint | ( |  | ) |
| pure virtual

Invalidates the screen, causing a repaint.

## ◆ restore()

virtual void clan::DisplayWindowProvider::restore | ( |  | ) |
| pure virtual

Restores the window.

## ◆ screen_to_client()

virtual Point clan::DisplayWindowProvider::screen_to_client | ( | const Point & | screen | ) |
| pure virtual

Convert from screen coordinates to client coordinates.

## ◆ set_clipboard_image()

virtual void clan::DisplayWindowProvider::set_clipboard_image | ( | const PixelBuffer & | buf | ) |
| pure virtual

Stores an image in the clipboard.

## ◆ set_clipboard_text()

virtual void clan::DisplayWindowProvider::set_clipboard_text | ( | const std::string & | text | ) |
| pure virtual

Stores text in the clipboard.

## ◆ set_cursor() [1/2]

virtual void clan::DisplayWindowProvider::set_cursor | ( | CursorProvider * | cursor | ) |
| pure virtual

Sets the current cursor icon.

## ◆ set_cursor() [2/2]

virtual void clan::DisplayWindowProvider::set_cursor | ( | StandardCursor | type | ) |
| pure virtual

Sets the current cursor icon.

## ◆ set_enabled()

virtual void clan::DisplayWindowProvider::set_enabled | ( | bool | enable | ) |
| pure virtual

Enables or disables input into this window.

## ◆ set_large_icon()

virtual void clan::DisplayWindowProvider::set_large_icon | ( | const PixelBuffer & | image | ) |
| pure virtual

Sets the large icon used for this window.

## ◆ set_maximum_size()

virtual void clan::DisplayWindowProvider::set_maximum_size | ( | int | width,
|  | int | height,
|  | bool | client_area )
| pure virtual

Sets the maximum size allowed for this window when resizing.

Parameters

  width | Maximum width of the window.
  height | Maximum height of the window.
  client_area | Size includes the entire window frame?

## ◆ set_minimum_size()

virtual void clan::DisplayWindowProvider::set_minimum_size | ( | int | width,
|  | int | height,
|  | bool | client_area )
| pure virtual

Sets the minimum size allowed for this window when resizing.

Parameters

  width | Minimum width of the window.
  height | Minimum height of the window.
  client_area | Size includes the entire window frame?

## ◆ set_pixel_ratio()

virtual void clan::DisplayWindowProvider::set_pixel_ratio | ( | float | ratio | ) |
| pure virtual

Sets the display pixel ratio of this window.

Parameters

  ratio | The new display pixel ratio to use on this window.

## ◆ set_position()

virtual void clan::DisplayWindowProvider::set_position | ( | const Rect & | pos,
|  | bool | client_area )
| pure virtual

Sets the position and size of this window on the screen.

## ◆ set_size()

virtual void clan::DisplayWindowProvider::set_size | ( | int | width,
|  | int | height,
|  | bool | client_area )
| pure virtual

Sets the size of this window.

Parameters

  width | Minimum width of the window.
  height | Minimum height of the window.
  client_area | Size includes the entire window frame?

## ◆ set_small_icon()

virtual void clan::DisplayWindowProvider::set_small_icon | ( | const PixelBuffer & | image | ) |
| pure virtual

Sets the small icon used for this window.

## ◆ set_title()

virtual void clan::DisplayWindowProvider::set_title | ( | const std::string & | new_title | ) |
| pure virtual

Change window title.

## ◆ show()

virtual void clan::DisplayWindowProvider::show | ( | bool | activate | ) |
| pure virtual

Displays the window in its current size and position.

## ◆ show_system_cursor()

virtual void clan::DisplayWindowProvider::show_system_cursor | ( |  | ) |
| pure virtual

Shows the mouse cursor.

## ◆ toggle_fullscreen()

virtual void clan::DisplayWindowProvider::toggle_fullscreen | ( |  | ) |
| pure virtual

Toggle fullscreen Only Win32 implementation for now

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

- display_window_provider.h