ReactOS  0.4.15-dev-507-g90aff8d
gui.cpp File Reference
#include "rapps.h"
#include "rosui.h"
#include "crichedit.h"
#include <shlobj_undoc.h>
#include <shlguid_undoc.h>
#include <atlbase.h>
#include <atlcom.h>
#include <atlwin.h>
#include <wininet.h>
#include <shellutils.h>
#include <rosctrls.h>
Include dependency graph for gui.cpp:

Go to the source code of this file.

Classes

class  CAppRichEdit
 
class  CMainToolbar
 
class  CAppsListView
 
struct  CAppsListView::SortContext
 
class  CSideTreeView
 
class  CSearchBar
 
class  CMainWindow
 

Macros

#define SEARCH_TIMER_ID   'SR'
 
#define LISTVIEW_ICON_SIZE   24
 
#define TREEVIEW_ICON_SIZE   24
 
#define GET_INFO(a, b, c, d)
 

Functions

INT GetSystemColorDepth ()
 
VOID ShowMainWindow (INT nShowCmd)
 

Macro Definition Documentation

◆ GET_INFO

#define GET_INFO (   a,
  b,
  c,
  d 
)
Value:
if (Info->GetApplicationString(a, szInfo)) \
{ \
LoadAndInsertText(b, szInfo, c, d); \
}
struct TraceInfo Info
GLboolean GLboolean GLboolean b
Definition: glext.h:6204
#define d
Definition: ke_i.h:81
const GLubyte * c
Definition: glext.h:8905
GLboolean GLboolean GLboolean GLboolean a
Definition: glext.h:6204

◆ LISTVIEW_ICON_SIZE

#define LISTVIEW_ICON_SIZE   24

Definition at line 26 of file gui.cpp.

◆ SEARCH_TIMER_ID

#define SEARCH_TIMER_ID   'SR'

Definition at line 25 of file gui.cpp.

◆ TREEVIEW_ICON_SIZE

#define TREEVIEW_ICON_SIZE   24

Definition at line 27 of file gui.cpp.

Function Documentation

◆ GetSystemColorDepth()

INT GetSystemColorDepth ( )

Definition at line 29 of file gui.cpp.

30 {
31  DEVMODEW pDevMode;
32  INT ColorDepth;
33 
34  pDevMode.dmSize = sizeof(pDevMode);
35  pDevMode.dmDriverExtra = 0;
36 
38  {
39  /* TODO: Error message */
40  return ILC_COLOR;
41  }
42 
43  switch (pDevMode.dmBitsPerPel)
44  {
45  case 32: ColorDepth = ILC_COLOR32; break;
46  case 24: ColorDepth = ILC_COLOR24; break;
47  case 16: ColorDepth = ILC_COLOR16; break;
48  case 8: ColorDepth = ILC_COLOR8; break;
49  case 4: ColorDepth = ILC_COLOR4; break;
50  default: ColorDepth = ILC_COLOR; break;
51  }
52 
53  return ColorDepth;
54 }
#define ILC_COLOR16
Definition: commctrl.h:352
WORD dmDriverExtra
Definition: wingdi.h:1620
DWORD dmBitsPerPel
Definition: wingdi.h:1646
int32_t INT
Definition: typedefs.h:57
#define ENUM_CURRENT_SETTINGS
Definition: winuser.h:179
#define ILC_COLOR4
Definition: commctrl.h:350
#define ILC_COLOR32
Definition: commctrl.h:354
#define ILC_COLOR
Definition: commctrl.h:348
smooth NULL
Definition: ftsmooth.c:416
BOOL WINAPI EnumDisplaySettingsW(LPCWSTR lpszDeviceName, DWORD iModeNum, LPDEVMODEW lpDevMode)
Definition: display.c:408
#define ILC_COLOR24
Definition: commctrl.h:353
WORD dmSize
Definition: wingdi.h:1619
#define ILC_COLOR8
Definition: commctrl.h:351

Referenced by CMainToolbar::InitImageList(), and CMainWindow::UpdateApplicationsList().

◆ ShowMainWindow()

VOID ShowMainWindow ( INT  nShowCmd)

Definition at line 1891 of file gui.cpp.

1892 {
1893  HACCEL KeyBrd;
1894  MSG Msg;
1895 
1896  CMainWindow* wnd = new CMainWindow();
1897  if (!wnd)
1898  return;
1899 
1900  hMainWnd = wnd->Create();
1901  if (!hMainWnd)
1902  return;
1903 
1904  /* Maximize it if we must */
1906  wnd->UpdateWindow();
1907 
1908  /* Load the menu hotkeys */
1910 
1911  /* Message Loop */
1912  while (GetMessageW(&Msg, NULL, 0, 0))
1913  {
1914  if (!TranslateAcceleratorW(hMainWnd, KeyBrd, &Msg))
1915  {
1916  if (Msg.message == WM_CHAR &&
1917  Msg.wParam == VK_TAB)
1918  {
1919  // Move backwards if shift is held down
1920  int direction = (GetKeyState(VK_SHIFT) & 0x8000) ? -1 : 1;
1921 
1922  wnd->HandleTabOrder(direction);
1923  continue;
1924  }
1925 
1928  }
1929  }
1930 
1931  delete wnd;
1932 }
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define WM_CHAR
Definition: winuser.h:1699
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
struct @1604 Msg[]
#define VK_TAB
Definition: winuser.h:2174
BOOL Maximized
Definition: winmain.h:14
LRESULT WINAPI DispatchMessageW(_In_ const MSG *)
#define VK_SHIFT
Definition: winuser.h:2177
HACCEL WINAPI LoadAcceleratorsW(_In_opt_ HINSTANCE, _In_ LPCWSTR)
smooth NULL
Definition: ftsmooth.c:416
SETTINGS_INFO SettingsInfo
Definition: winmain.cpp:18
SHORT WINAPI GetKeyState(_In_ int)
void HandleTabOrder(int direction)
Definition: gui.cpp:1867
BOOL UpdateWindow()
Definition: atlwin.h:1277
#define HOTKEYS
Definition: resource.h:217
int WINAPI TranslateAcceleratorW(_In_ HWND, _In_ HACCEL, _In_ LPMSG)
HWND hMainWnd
Definition: magnifier.c:32
HWND Create()
Definition: gui.cpp:1850
BOOL ShowWindow(int nCmdShow)
Definition: atlwin.h:1265
BOOL WINAPI GetMessageW(_Out_ LPMSG, _In_opt_ HWND, _In_ UINT, _In_ UINT)
BOOL bSaveWndPos
Definition: winmain.h:8
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SW_MAXIMIZE
Definition: winuser.h:766

Referenced by wWinMain().