libosmscout 1.1.1
Loading...
Searching...
No Matches
osmscout::MapPainterGDIWindow Class Reference

#include <libosmscout-map-gdi/include/osmscoutmapgdi/MapPainterGDIWindow.h>

Collaboration diagram for osmscout::MapPainterGDIWindow:

Public Member Functions

 MapPainterGDIWindow ()
 Default constructor.
 MapPainterGDIWindow (const StyleConfigRef &styleConfig, RECT position, HWND hWndParent, HINSTANCE hInstance=nullptr)
 Default constructor.
 ~MapPainterGDIWindow ()
 Default destructor.
bool CreateCanvas (const StyleConfigRef &styleConfig, RECT position, HWND hWndParent=nullptr, HINSTANCE hInstance=nullptr)
 Creates the drawing window.
virtual LRESULT OnWinMsg (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 Function for Windows message handling.
virtual void OnTileUpdate ()
 Function to update tile data.
void Set (osmscout::Projection *pProjection, osmscout::MapParameter *pParameter, osmscout::MapData *pData)
 Sets data and settings for rendering.
void MoveWindow (RECT position, bool bRepaint=true)
 Move current window.
void InvalidateWindow ()
 Declares the window invalid and initiates a redraw.
LRESULT CALLBACK WinMsgHandler (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 Windows message handler function.

Protected Attributes

HINSTANCE m_hInstance
HWND m_hWnd
HWND m_hWndParent
osmscout::MapPainterGDIm_pPainter
osmscout::Projectionm_pProjection
osmscout::MapParameter * m_pParameter
osmscout::MapData * m_pData

Constructor & Destructor Documentation

◆ MapPainterGDIWindow() [1/2]

osmscout::MapPainterGDIWindow::MapPainterGDIWindow ( )

Default constructor.

Standard constructor.

◆ MapPainterGDIWindow() [2/2]

osmscout::MapPainterGDIWindow::MapPainterGDIWindow ( const StyleConfigRef & styleConfig,
RECT position,
HWND hWndParent,
HINSTANCE hInstance = nullptr )

Default constructor.

Standard constructor with parameters for map display.

Parameters
[in]styleConfigConfiguration of the drawing styles
[in]positionPosition and size of the drawing window.
[in]hWndParentHandle of parent Windows or NULL for non-child window.
[in]hInstancehInstance of the program or NULL for default.

◆ ~MapPainterGDIWindow()

osmscout::MapPainterGDIWindow::~MapPainterGDIWindow ( )

Default destructor.

Standard destructor to release reserved memory.

Member Function Documentation

◆ CreateCanvas()

bool osmscout::MapPainterGDIWindow::CreateCanvas ( const StyleConfigRef & styleConfig,
RECT position,
HWND hWndParent = nullptr,
HINSTANCE hInstance = nullptr )

Creates the drawing window.

Creates the drawing window if it does not yet exist.

Parameters
[in]styleConfigConfiguration of the drawing styles
[in]positionPosition and size of the drawing window.
[in]hWndParentHandle of parent Windows or NULL for non-child window.
[in]hInstancehInstance of the program or NULL for default.

◆ InvalidateWindow()

void osmscout::MapPainterGDIWindow::InvalidateWindow ( )

Declares the window invalid and initiates a redraw.

The entire area of the window is declared invalid and thus a redraw is forced.

◆ MoveWindow()

void osmscout::MapPainterGDIWindow::MoveWindow ( RECT position,
bool bRepaint = true )

Move current window.

Sets a new position and/or size of the window.

Parameters
[in]positionRectangle (position and size) into which the window is fitted.
[in]bRepaintWith True the window is redrawn after the change.

◆ OnTileUpdate()

virtual void osmscout::MapPainterGDIWindow::OnTileUpdate ( )
virtual

Function to update tile data.

The function is called as a sub-function if the data must be updated before rendering. For example, when zoom, position or window size has been changed.

◆ OnWinMsg()

virtual LRESULT osmscout::MapPainterGDIWindow::OnWinMsg ( HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam )
virtual

Function for Windows message handling.

An application-defined function that processes messages sent to the window. The function can be overwritten in own classes to process the window messages. Some messages such as WM_PAINT are already processed by the class for the basic function.

Parameters
[in]hwndWindow handle.
[in]uMsgThe message ID.
[in]wParamAdditional message information. The contents of this parameter depend on the value of the uMsg parameter.
[in]lParamAdditional message information. The contents of this parameter depend on the value of the uMsg parameter.
Remarks
At the end of the nested overwritten function DefWindowProc(m_hWnd, uMsg, wParam, lParam) or the original function should be returned.

◆ Set()

void osmscout::MapPainterGDIWindow::Set ( osmscout::Projection * pProjection,
osmscout::MapParameter * pParameter,
osmscout::MapData * pData )

Sets data and settings for rendering.

Sets references to the projection, map parameters and map data used for rendering.

Parameters
[in]pProjectionPointer on map projection
[in]pParameterPointer on map parameter
[in]pDataPointer on map data

◆ WinMsgHandler()

LRESULT CALLBACK osmscout::MapPainterGDIWindow::WinMsgHandler ( HWND hwnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam )

Windows message handler function.

Non-static callback function to receive Windows messages of the used window in current class instance.

Warning
This function is for internal use only! Do not use it in your application!

Member Data Documentation

◆ m_hInstance

HINSTANCE osmscout::MapPainterGDIWindow::m_hInstance
protected

◆ m_hWnd

HWND osmscout::MapPainterGDIWindow::m_hWnd
protected

◆ m_hWndParent

HWND osmscout::MapPainterGDIWindow::m_hWndParent
protected

◆ m_pData

osmscout::MapData* osmscout::MapPainterGDIWindow::m_pData
protected

◆ m_pPainter

osmscout::MapPainterGDI* osmscout::MapPainterGDIWindow::m_pPainter
protected

◆ m_pParameter

osmscout::MapParameter* osmscout::MapPainterGDIWindow::m_pParameter
protected

◆ m_pProjection

osmscout::Projection* osmscout::MapPainterGDIWindow::m_pProjection
protected

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