Scope
scope::gui::CChannelView Class Reference

#include <ChannelView.h>

Inherits CWindowImpl< CChannelView >.

Public Member Functions

 DECLARE_WND_CLASS_EX (nullptr, CS_HREDRAW|CS_VREDRAW,-1)
 
Called via Win32 messages
BOOL PreTranslateMessage (MSG *pMsg)
 
int OnCreate (LPCREATESTRUCT lpCreateStruct)
 
LRESULT OnEraseBkgnd (HDC wParam)
 
void OnPaint (CDCHandle)
 
void OnSize (UINT, CSize size)
 
LRESULT OnMouseMove (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
void OnDisplayChange (UINT, CSize)
 
Called from CChannelFrame
D2D1_SIZE_F GetRendererSize () const
 
void Render ()
 
void ResizeContent (const uint32_t &_xres, const uint32_t &_yres)
 
ID2D1Bitmap * GetBitmap ()
 
virtual void UpdateScaleText (const std::wstring &_text)
 

Protected Attributes

d2d::D2ChannelRender renderer
 

Detailed Description

CChannelView is just a dumb holder for the renderer and takes care of window resizes etc.

Definition at line 9 of file ChannelView.h.

Member Function Documentation

scope::gui::CChannelView::DECLARE_WND_CLASS_EX ( nullptr  ,
CS_HREDRAW|  CS_VREDRAW,
1 
)

Set background brush to -1, avoids erasure of background (similar effect as OnEraseBkgnd below...)

BOOL scope::gui::CChannelView::PreTranslateMessage ( MSG *  pMsg)

Does nothing (-> disable default handling)

Definition at line 14 of file ChannelView.cpp.

int scope::gui::CChannelView::OnCreate ( LPCREATESTRUCT  lpCreateStruct)

Creates the renderer.

Definition at line 9 of file ChannelView.cpp.

LRESULT scope::gui::CChannelView::OnEraseBkgnd ( HDC  wParam)
inline

avoids flickering during resize

Definition at line 38 of file ChannelView.h.

void scope::gui::CChannelView::OnPaint ( CDCHandle  )

Calls renderer and validates rect.

Definition at line 19 of file ChannelView.cpp.

void scope::gui::CChannelView::OnSize ( UINT  ,
CSize  size 
)

Calls renderer's resize.

Definition at line 27 of file ChannelView.cpp.

LRESULT scope::gui::CChannelView::OnMouseMove ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL &  bHandled 
)

Handles WM_MOUSEMOVE messages, just passes them on to ChannelFrame (the parent) via user-defined message WM_UPDATEMOUSEPIXEL.

Definition at line 36 of file ChannelView.cpp.

void scope::gui::CChannelView::OnDisplayChange ( UINT  ,
CSize   
)

Calls renderer.

Definition at line 32 of file ChannelView.cpp.

D2D1_SIZE_F scope::gui::CChannelView::GetRendererSize ( ) const
Returns
returns the current size of the renderer

Definition at line 42 of file ChannelView.cpp.

void scope::gui::CChannelView::Render ( )

Calls renderer.Render.

Definition at line 46 of file ChannelView.cpp.

void scope::gui::CChannelView::ResizeContent ( const uint32_t &  _xres,
const uint32_t &  _yres 
)

Resizes the bitmap of the renderer.

Calls renderer.ResizeBitmap

Parameters
[in]_xres,_yresnew size for the bitmap

Definition at line 50 of file ChannelView.cpp.

ID2D1Bitmap * scope::gui::CChannelView::GetBitmap ( )
Returns
returns a pointer to the bitmap inside the renderer

Definition at line 54 of file ChannelView.cpp.

void scope::gui::CChannelView::UpdateScaleText ( const std::wstring &  _text)
virtual

Update the scale text.

Calls d2d::D2ChannelRender::UpdateScaleText

Definition at line 58 of file ChannelView.cpp.

Member Data Documentation

d2d::D2ChannelRender scope::gui::CChannelView::renderer
protected

the Direct2D renderer class

Definition at line 14 of file ChannelView.h.


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