ReactOS  0.4.15-dev-5615-gc3644fd
CScrollboxWindow Class Reference

#include <scrollbox.h>

Inheritance diagram for CScrollboxWindow:
Collaboration diagram for CScrollboxWindow:

Public Member Functions

LRESULT OnSize (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnHScroll (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnVScroll (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnLButtonDown (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnMouseWheel (UINT nMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 

Detailed Description

Definition at line 11 of file scrollbox.h.

Member Function Documentation

◆ OnHScroll()

LRESULT CScrollboxWindow::OnHScroll ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 108 of file scrollbox.cpp.

109 {
110  if (m_hWnd == scrollboxWindow.m_hWnd)
111  {
112  SCROLLINFO si;
113  si.cbSize = sizeof(SCROLLINFO);
114  si.fMask = SIF_ALL;
115  scrollboxWindow.GetScrollInfo(SB_HORZ, &si);
116  switch (LOWORD(wParam))
117  {
118  case SB_THUMBTRACK:
119  case SB_THUMBPOSITION:
120  si.nPos = HIWORD(wParam);
121  break;
122  case SB_LINELEFT:
123  si.nPos -= 5;
124  break;
125  case SB_LINERIGHT:
126  si.nPos += 5;
127  break;
128  case SB_PAGELEFT:
129  si.nPos -= si.nPage;
130  break;
131  case SB_PAGERIGHT:
132  si.nPos += si.nPage;
133  break;
134  }
135  scrollboxWindow.SetScrollInfo(SB_HORZ, &si);
136  scrlClientWindow.MoveWindow(-scrollboxWindow.GetScrollPos(SB_HORZ),
137  -scrollboxWindow.GetScrollPos(SB_VERT),
140  }
141  return 0;
142 }
static int Zoomed(int xy)
Definition: common.h:37
#define SB_VERT
Definition: winuser.h:553
#define TRUE
Definition: types.h:120
#define SB_HORZ
Definition: winuser.h:552
WPARAM wParam
Definition: combotst.c:138
#define SB_THUMBPOSITION
Definition: winuser.h:572
int GetWidth() const
Definition: history.cpp:215
struct tagSCROLLINFO SCROLLINFO
CScrollboxWindow scrlClientWindow
Definition: main.cpp:70
#define SB_THUMBTRACK
Definition: winuser.h:573
#define GRIP_SIZE
Definition: common.h:13
#define SB_PAGELEFT
Definition: winuser.h:570
ImageModel imageModel
Definition: main.cpp:32
#define SB_LINERIGHT
Definition: winuser.h:567
int GetHeight() const
Definition: history.cpp:220
#define SB_PAGERIGHT
Definition: winuser.h:571
CScrollboxWindow scrollboxWindow
Definition: main.cpp:69
#define HIWORD(l)
Definition: typedefs.h:247
#define SB_LINELEFT
Definition: winuser.h:566
#define LOWORD(l)
Definition: pedump.c:82
#define SIF_ALL
Definition: winuser.h:1222

◆ OnLButtonDown()

LRESULT CScrollboxWindow::OnLButtonDown ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 180 of file scrollbox.cpp.

181 {
182  selectionWindow.ShowWindow(SW_HIDE);
183 
184  switch (toolsModel.GetActiveTool())
185  {
186  case TOOL_BEZIER:
187  case TOOL_SHAPE:
188  if (ToolBase::pointSP != 0)
189  {
192  }
193  break;
194 
195  default:
196  break;
197  }
198 
199  toolsModel.resetTool(); // resets the point-buffer of the polygon and bezier functions
200  return 0;
201 }
ToolsModel toolsModel
Definition: main.cpp:18
void resetTool()
Definition: toolsmodel.cpp:231
#define SW_HIDE
Definition: winuser.h:762
void OnCancelDraw()
Definition: toolsmodel.cpp:215
CImgAreaWindow imageArea
Definition: main.cpp:72
static INT pointSP
Definition: toolsmodel.h:39
TOOLTYPE GetActiveTool() const
Definition: toolsmodel.cpp:76
BOOL Invalidate(BOOL bErase=TRUE)
Definition: atlwin.h:890
CSelectionWindow selectionWindow
Definition: main.cpp:71

◆ OnMouseWheel()

LRESULT CScrollboxWindow::OnMouseWheel ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 203 of file scrollbox.cpp.

204 {
206 }
WPARAM wParam
Definition: combotst.c:138
HWND WINAPI GetParent(_In_ HWND)
#define SendMessage
Definition: winuser.h:5833
LPARAM lParam
Definition: combotst.c:139

◆ OnSize()

LRESULT CScrollboxWindow::OnSize ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 99 of file scrollbox.cpp.

100 {
101  if (m_hWnd && m_hWnd == scrollboxWindow.m_hWnd)
102  {
103  UpdateScrollbox();
104  }
105  return 0;
106 }
CScrollboxWindow scrollboxWindow
Definition: main.cpp:69
void UpdateScrollbox()
Definition: scrollbox.cpp:53

◆ OnVScroll()

LRESULT CScrollboxWindow::OnVScroll ( UINT  nMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 144 of file scrollbox.cpp.

145 {
146  if (m_hWnd == scrollboxWindow.m_hWnd)
147  {
148  SCROLLINFO si;
149  si.cbSize = sizeof(SCROLLINFO);
150  si.fMask = SIF_ALL;
151  scrollboxWindow.GetScrollInfo(SB_VERT, &si);
152  switch (LOWORD(wParam))
153  {
154  case SB_THUMBTRACK:
155  case SB_THUMBPOSITION:
156  si.nPos = HIWORD(wParam);
157  break;
158  case SB_LINEUP:
159  si.nPos -= 5;
160  break;
161  case SB_LINEDOWN:
162  si.nPos += 5;
163  break;
164  case SB_PAGEUP:
165  si.nPos -= si.nPage;
166  break;
167  case SB_PAGEDOWN:
168  si.nPos += si.nPage;
169  break;
170  }
171  scrollboxWindow.SetScrollInfo(SB_VERT, &si);
172  scrlClientWindow.MoveWindow(-scrollboxWindow.GetScrollPos(SB_HORZ),
173  -scrollboxWindow.GetScrollPos(SB_VERT),
176  }
177  return 0;
178 }
static int Zoomed(int xy)
Definition: common.h:37
#define SB_PAGEDOWN
Definition: winuser.h:569
#define SB_PAGEUP
Definition: winuser.h:568
#define SB_VERT
Definition: winuser.h:553
#define TRUE
Definition: types.h:120
#define SB_HORZ
Definition: winuser.h:552
WPARAM wParam
Definition: combotst.c:138
#define SB_THUMBPOSITION
Definition: winuser.h:572
int GetWidth() const
Definition: history.cpp:215
struct tagSCROLLINFO SCROLLINFO
CScrollboxWindow scrlClientWindow
Definition: main.cpp:70
#define SB_THUMBTRACK
Definition: winuser.h:573
#define GRIP_SIZE
Definition: common.h:13
ImageModel imageModel
Definition: main.cpp:32
int GetHeight() const
Definition: history.cpp:220
#define SB_LINEDOWN
Definition: winuser.h:565
#define SB_LINEUP
Definition: winuser.h:564
CScrollboxWindow scrollboxWindow
Definition: main.cpp:69
#define HIWORD(l)
Definition: typedefs.h:247
#define LOWORD(l)
Definition: pedump.c:82
#define SIF_ALL
Definition: winuser.h:1222

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