ReactOS  0.4.14-dev-50-g13bb5e2
CTaskToolbar Class Reference
Inheritance diagram for CTaskToolbar:
Collaboration diagram for CTaskToolbar:

Public Member Functions

INT UpdateTbButtonSpacing (IN BOOL bHorizontal, IN BOOL bThemed, IN UINT uiRows=0, IN UINT uiBtnsPerLine=0)
 
VOID BeginUpdate ()
 
VOID EndUpdate ()
 
BOOL SetButtonCommandId (IN INT iButtonIndex, IN INT iCommandId)
 
LRESULT OnNcHitTestToolbar (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
BOOL Initialize (HWND hWndParent)
 
- Public Member Functions inherited from ATL::CWindowImplBaseT< CToolbar< TASK_ITEM >, CControlWinTraits >
 CWindowImplBaseT ()
 
virtual void OnFinalMessage (HWND)
 
BOOL SubclassWindow (HWND hWnd)
 
virtual WNDPROC GetWindowProc ()
 
LRESULT DefWindowProc (UINT uMsg, WPARAM wParam, LPARAM lParam)
 
HWND Create (HWND hWndParent, _U_RECT rect, LPCTSTR szWindowName, DWORD dwStyle, DWORD dwExStyle, _U_MENUorID MenuOrID, ATOM atom, LPVOID lpCreateParam)
 
- Public Member Functions inherited from ATL::CWindowImplRoot< CToolbar< TASK_ITEM > >
 CWindowImplRoot ()
 
virtual ~CWindowImplRoot ()
 
- Public Member Functions inherited from CToolbar< TASK_ITEM >
HWND Create (HWND hWndParent, DWORD dwStyles=0, DWORD dwExStyles=0)
 
DWORD SetButtonStructSize ()
 
HWND GetTooltip ()
 
DWORD SetTooltip (HWND hWndTooltip)
 
INT GetHotItem ()
 
DWORD SetHotItem (INT item)
 
int GetButtonCount ()
 
DWORD GetButton (int index, TBBUTTON *btn)
 
DWORD AddButton (TBBUTTON *btn)
 
DWORD AddButtons (int count, TBBUTTON *buttons)
 
DWORD InsertButton (int insertAt, TBBUTTON *btn)
 
DWORD MoveButton (int oldIndex, int newIndex)
 
DWORD DeleteButton (int index)
 
DWORD GetButtonInfo (int cmdId, TBBUTTONINFO *info)
 
DWORD SetButtonInfo (int cmdId, TBBUTTONINFO *info)
 
DWORD CheckButton (int cmdId, BOOL bCheck)
 
DWORD GetButtonSize ()
 
DWORD SetButtonSize (int w, int h)
 
DWORD AutoSize ()
 
DWORD GetMaxSize (LPSIZE size)
 
DWORD GetIdealSize (BOOL useHeight, LPSIZE size)
 
DWORD GetMetrics (TBMETRICS *tbm)
 
DWORD SetMetrics (TBMETRICS *tbm)
 
DWORD GetItemRect (int index, LPRECT prcItem)
 
DWORD SetRedraw (BOOL bEnable)
 
DWORD GetPadding ()
 
DWORD SetPadding (int x, int y)
 
HIMAGELIST SetImageList (HIMAGELIST himl)
 
INT HitTest (PPOINT ppt)
 
TASK_ITEMGetItemData (int index)
 
DWORD SetItemData (int index, TASK_ITEM *data)
 
- Public Member Functions inherited from ATL::CMessageMap
virtual BOOL ProcessWindowMessage (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT &lResult, DWORD dwMsgMapID)=0
 

Additional Inherited Members

- Public Types inherited from ATL::CWindowImplRoot< CToolbar< TASK_ITEM > >
enum  
 
- Static Public Member Functions inherited from ATL::CWindowImplBaseT< CToolbar< TASK_ITEM >, CControlWinTraits >
static DWORD GetWndStyle (DWORD dwStyle)
 
static DWORD GetWndExStyle (DWORD dwExStyle)
 
static LRESULT CALLBACK StartWindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
static LRESULT CALLBACK WindowProc (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
 
- Public Attributes inherited from ATL::CWindowImplBaseT< CToolbar< TASK_ITEM >, CControlWinTraits >
WNDPROC m_pfnSuperWindowProc
 
- Public Attributes inherited from ATL::CWindowImplRoot< CToolbar< TASK_ITEM > >
CWndProcThunk m_thunk
 
const _ATL_MSGm_pCurrentMsg
 
DWORD m_dwState
 

Detailed Description

Definition at line 199 of file taskswnd.cpp.

Member Function Documentation

◆ BeginUpdate()

VOID CTaskToolbar::BeginUpdate ( )
inline

Definition at line 235 of file taskswnd.cpp.

236  {
237  SetRedraw(FALSE);
238  }
DWORD SetRedraw(BOOL bEnable)
Definition: rosctrls.h:401

Referenced by CTaskSwitchWnd::AddTaskItemButton(), CTaskSwitchWnd::DeleteTaskItemButton(), and CTaskSwitchWnd::UpdateButtonsSize().

◆ EndUpdate()

VOID CTaskToolbar::EndUpdate ( )
inline

Definition at line 240 of file taskswnd.cpp.

241  {
244  }
#define TRUE
Definition: types.h:120
#define WM_SETREDRAW
Definition: winuser.h:1598
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)

Referenced by CTaskSwitchWnd::AddTaskItemButton(), CTaskSwitchWnd::DeleteTaskItemButton(), and CTaskSwitchWnd::UpdateButtonsSize().

◆ Initialize()

BOOL CTaskToolbar::Initialize ( HWND  hWndParent)
inline

Definition at line 282 of file taskswnd.cpp.

283  {
287 
288  return SubclassWindow(CToolbar::Create(hWndParent, styles));
289  }
HWND Create(HWND hWndParent, DWORD dwStyles=0, DWORD dwExStyles=0)
Definition: rosctrls.h:254
#define TBSTYLE_TRANSPARENT
Definition: commctrl.h:968
#define WS_CHILD
Definition: pedump.c:617
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define CCS_NODIVIDER
Definition: commctrl.h:2220
#define CCS_TOP
Definition: commctrl.h:2214
unsigned long DWORD
Definition: ntddk_ex.h:95
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:961
#define CCS_NORESIZE
Definition: commctrl.h:2217
#define TBSTYLE_WRAPABLE
Definition: commctrl.h:962
#define WS_VISIBLE
Definition: pedump.c:620
#define TBSTYLE_LIST
Definition: commctrl.h:965

Referenced by CTaskSwitchWnd::OnCreate().

◆ OnNcHitTestToolbar()

LRESULT CTaskToolbar::OnNcHitTestToolbar ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)
inline

Definition at line 257 of file taskswnd.cpp.

258  {
259  POINT pt;
260 
261  /* See if the mouse is on a button */
262  pt.x = GET_X_LPARAM(lParam);
263  pt.y = GET_Y_LPARAM(lParam);
264  ScreenToClient(&pt);
265 
266  INT index = HitTest(&pt);
267  if (index < 0)
268  {
269  /* Make the control appear to be transparent outside of any buttons */
270  return HTTRANSPARENT;
271  }
272 
273  bHandled = FALSE;
274  return 0;
275  }
#define HTTRANSPARENT
Definition: winuser.h:2448
INT HitTest(PPOINT ppt)
Definition: rosctrls.h:423
#define pt(x, y)
Definition: drawing.c:79
#define GET_X_LPARAM(lp)
Definition: windowsx.h:274
int32_t INT
Definition: typedefs.h:56
GLuint index
Definition: glext.h:6031
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:275
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
LPARAM lParam
Definition: combotst.c:139

◆ SetButtonCommandId()

BOOL CTaskToolbar::SetButtonCommandId ( IN INT  iButtonIndex,
IN INT  iCommandId 
)
inline

Definition at line 246 of file taskswnd.cpp.

247  {
248  TBBUTTONINFO tbbi;
249 
250  tbbi.cbSize = sizeof(tbbi);
251  tbbi.dwMask = TBIF_BYINDEX | TBIF_COMMAND;
252  tbbi.idCommand = iCommandId;
253 
254  return SetButtonInfo(iButtonIndex, &tbbi) != 0;
255  }
#define TBIF_COMMAND
Definition: commctrl.h:1196
#define TBIF_BYINDEX
Definition: commctrl.h:1198
DWORD SetButtonInfo(int cmdId, TBBUTTONINFO *info)
Definition: rosctrls.h:350
#define TBBUTTONINFO
Definition: commctrl.h:1226

Referenced by CTaskSwitchWnd::UpdateIndexesAfter().

◆ UpdateTbButtonSpacing()

INT CTaskToolbar::UpdateTbButtonSpacing ( IN BOOL  bHorizontal,
IN BOOL  bThemed,
IN UINT  uiRows = 0,
IN UINT  uiBtnsPerLine = 0 
)
inline

Definition at line 203 of file taskswnd.cpp.

204  {
205  TBMETRICS tbm;
206 
207  tbm.cbSize = sizeof(tbm);
209 
210  tbm.cxBarPad = tbm.cyBarPad = 0;
211 
212  if (bThemed)
213  {
214  tbm.cxButtonSpacing = 0;
215  tbm.cyButtonSpacing = 0;
216  }
217  else
218  {
219  if (bHorizontal || uiBtnsPerLine > 1)
220  tbm.cxButtonSpacing = (3 * GetSystemMetrics(SM_CXEDGE) / 2);
221  else
222  tbm.cxButtonSpacing = 0;
223 
224  if (!bHorizontal || uiRows > 1)
225  tbm.cyButtonSpacing = (3 * GetSystemMetrics(SM_CYEDGE) / 2);
226  else
227  tbm.cyButtonSpacing = 0;
228  }
229 
230  SetMetrics(&tbm);
231 
232  return tbm.cxButtonSpacing;
233  }
#define SM_CXEDGE
Definition: winuser.h:998
#define TBMF_BUTTONSPACING
Definition: commctrl.h:1261
#define SM_CYEDGE
Definition: winuser.h:999
int cyButtonSpacing
Definition: commctrl.h:1271
int WINAPI GetSystemMetrics(_In_ int)
DWORD SetMetrics(TBMETRICS *tbm)
Definition: rosctrls.h:391
UINT cbSize
Definition: commctrl.h:1264
int cxBarPad
Definition: commctrl.h:1268
#define TBMF_BARPAD
Definition: commctrl.h:1260
int cxButtonSpacing
Definition: commctrl.h:1270
DWORD dwMask
Definition: commctrl.h:1265
int cyBarPad
Definition: commctrl.h:1269

Referenced by CTaskSwitchWnd::OnCreate(), CTaskSwitchWnd::OnUpdateTaskbarPos(), and CTaskSwitchWnd::UpdateButtonsSize().


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