ReactOS 0.4.15-dev-7942-gd23573b
ExplorerGlobals Struct Reference

structure containing global variables of Explorer More...

#include <globals.h>

Collaboration diagram for ExplorerGlobals:

Public Member Functions

 ExplorerGlobals ()
 
void init (HINSTANCE hInstance)
 
void read_persistent ()
 
void write_persistent ()
 
XMLPos get_cfg ()
 
XMLPos get_cfg (const char *path)
 
 DWORD (STDAPICALLTYPE *_SHRestricted)(RESTRICTIONS)
 

Public Attributes

HINSTANCE _hInstance
 
UINT _cfStrFName
 
ATOM _hframeClass
 
HWND _hMainWnd
 
bool _desktop_mode
 
bool _prescan_nodes
 
FILE_log
 
FileTypeManager _ftype_mgr
 
IconCache _icon_cache
 
HWND _hwndDesktopBar
 
HWND _hwndShellView
 
HWND _hwndDesktop
 
Desktops _desktops
 
XMLDoc _cfg
 
String _cfg_dir
 
String _cfg_path
 
Favorites _favorites
 
String _favorites_path
 

Detailed Description

structure containing global variables of Explorer

Definition at line 258 of file globals.h.

Constructor & Destructor Documentation

◆ ExplorerGlobals()

ExplorerGlobals::ExplorerGlobals ( )

Definition at line 56 of file explorer.cpp.

57{
58 _hInstance = 0;
59 _cfStrFName = 0;
60
61#ifndef ROSSHELL
62 _hframeClass = 0;
63 _hMainWnd = 0;
64 _desktop_mode = false;
65 _prescan_nodes = false;
66#endif
67
68 _log = NULL;
69 _SHRestricted = 0;
72 _hwndDesktop = 0;
73}
#define NULL
Definition: types.h:112
HINSTANCE _hInstance
Definition: globals.h:270
HWND _hwndDesktopBar
Definition: globals.h:287
ATOM _hframeClass
Definition: globals.h:274
bool _prescan_nodes
Definition: globals.h:277
FILE * _log
Definition: globals.h:280
UINT _cfStrFName
Definition: globals.h:271
bool _desktop_mode
Definition: globals.h:276
HWND _hwndShellView
Definition: globals.h:288
HWND _hwndDesktop
Definition: globals.h:289
HWND _hMainWnd
Definition: globals.h:275

Member Function Documentation

◆ DWORD()

ExplorerGlobals::DWORD ( STDAPICALLTYPE _SHRestricted)

◆ get_cfg() [1/2]

XMLPos ExplorerGlobals::get_cfg ( )

Definition at line 119 of file explorer.cpp.

120{
121 XMLPos cfg_pos(&_cfg);
122
123 cfg_pos.smart_create("explorer-cfg");
124
125 return cfg_pos;
126}
XMLDoc _cfg
Definition: globals.h:293
iterator for XML trees
Definition: xmlstorage.h:1494

Referenced by TaskbarSettingsDlg::Command(), MdiSdiDlg::Command(), StartMenuHandler::Command(), MdiSdiDlg::MdiSdiDlg(), MainFrameBase::OpenShellFolders(), NotifyArea::read_config(), TaskbarSettingsDlg::TaskbarSettingsDlg(), and NotifyArea::write_config().

◆ get_cfg() [2/2]

XMLPos ExplorerGlobals::get_cfg ( const char path)

Definition at line 128 of file explorer.cpp.

129{
130 XMLPos cfg_pos(&_cfg);
131
132 cfg_pos.smart_create("explorer-cfg");
133 cfg_pos.create_relative(path);
134
135 return cfg_pos;
136}

◆ init()

void ExplorerGlobals::init ( HINSTANCE  hInstance)

Definition at line 76 of file explorer.cpp.

77{
79 _SHRestricted = (DWORD(STDAPICALLTYPE*)(RESTRICTIONS)) GetProcAddress(GetModuleHandle(TEXT("SHELL32")), "SHRestricted");
81}
HINSTANCE hInstance
Definition: charmap.c:19
#define GetProcAddress(x, y)
Definition: compat.h:753
#define STDAPICALLTYPE
Definition: guid.c:3
#define TEXT(s)
Definition: k32.h:26
#define DWORD
Definition: nt_native.h:44
RESTRICTIONS
Definition: shlobj.h:1626
IconCache _icon_cache
Definition: globals.h:285
void init()
Definition: explorer.cpp:381
#define GetModuleHandle
Definition: winbase.h:3827

Referenced by _tWinMain().

◆ read_persistent()

void ExplorerGlobals::read_persistent ( )

Definition at line 84 of file explorer.cpp.

85{
86 // read configuration file
87 _cfg_dir.printf(TEXT("%s\\ReactOS"), (LPCTSTR)SpecialFolderFSPath(CSIDL_APPDATA,0));
88 _cfg_path.printf(TEXT("%s\\ros-explorer-cfg.xml"), _cfg_dir.c_str());
89
90 if (!_cfg.read_file(_cfg_path)) {
91 if (!_cfg._errors.empty()) {
94 TEXT("ROS Explorer - reading user settings"),
95 MB_OK);
96 }
97 _cfg.read_file(TEXT("explorer-cfg-template.xml"));
98 }
99
100 // read bookmarks
101 _favorites_path.printf(TEXT("%s\\ros-explorer-bookmarks.xml"), _cfg_dir.c_str());
102
106 }
107}
#define CSIDL_APPDATA
Definition: shlobj.h:2183
String _favorites_path
Definition: globals.h:298
String _cfg_dir
Definition: globals.h:294
String _cfg_path
Definition: globals.h:295
Favorites _favorites
Definition: globals.h:297
bool read(LPCTSTR path)
read XBEL bookmark file
Definition: favorites.cpp:425
bool import_IE_favorites(HWND hwnd)
import Internet Explorer bookmarks from Favorites folder
Definition: favorites.cpp:465
void write(LPCTSTR path) const
write XBEL bookmark file
Definition: favorites.cpp:448
file system path of special folder
bool read_file(LPCTSTR path)
Definition: xmlstorage.h:2741
XMLErrorList _errors
Definition: xmlstorage.h:2835
XS_String str() const
return merged error strings
Definition: xmlstorage.cpp:820
#define MB_OK
Definition: winuser.h:790
#define MessageBox
Definition: winuser.h:5822
const CHAR * LPCTSTR
Definition: xmlstorage.h:193

Referenced by _tWinMain().

◆ write_persistent()

void ExplorerGlobals::write_persistent ( )

Definition at line 109 of file explorer.cpp.

110{
111 // write configuration file
113
116}
BOOL RecursiveCreateDirectory(LPCTSTR path_in)
Definition: utility.cpp:394
bool write_file(LPCTSTR path, WRITE_MODE mode=FORMAT_SMART) const
Definition: xmlstorage.h:2820

Referenced by _tWinMain().

Member Data Documentation

◆ _cfg

XMLDoc ExplorerGlobals::_cfg

Definition at line 293 of file globals.h.

Referenced by get_cfg(), TaskbarSettingsDlg::Notify(), read_persistent(), and write_persistent().

◆ _cfg_dir

String ExplorerGlobals::_cfg_dir

Definition at line 294 of file globals.h.

Referenced by read_persistent(), and write_persistent().

◆ _cfg_path

String ExplorerGlobals::_cfg_path

Definition at line 295 of file globals.h.

Referenced by read_persistent(), and write_persistent().

◆ _cfStrFName

UINT ExplorerGlobals::_cfStrFName

Definition at line 271 of file globals.h.

Referenced by ExplorerGlobals(), ShellDirectory::fill_w32fdata_shell(), and InitInstance().

◆ _desktop_mode

bool ExplorerGlobals::_desktop_mode

Definition at line 276 of file globals.h.

Referenced by _tWinMain(), ExplorerGlobals(), and MainFrameBase::~MainFrameBase().

◆ _desktops

Desktops ExplorerGlobals::_desktops

◆ _favorites

Favorites ExplorerGlobals::_favorites

◆ _favorites_path

String ExplorerGlobals::_favorites_path

Definition at line 298 of file globals.h.

Referenced by read_persistent(), and write_persistent().

◆ _ftype_mgr

FileTypeManager ExplorerGlobals::_ftype_mgr

Definition at line 284 of file globals.h.

Referenced by ShellDirectory::read_directory(), and WinDirectory::read_directory().

◆ _hframeClass

ATOM ExplorerGlobals::_hframeClass

◆ _hInstance

◆ _hMainWnd

◆ _hwndDesktop

◆ _hwndDesktopBar

◆ _hwndShellView

◆ _icon_cache

◆ _log

FILE* ExplorerGlobals::_log

Definition at line 280 of file globals.h.

Referenced by _log_(), _tWinMain(), and ExplorerGlobals().

◆ _prescan_nodes

bool ExplorerGlobals::_prescan_nodes

Definition at line 277 of file globals.h.

Referenced by explorer_show_frame(), ExplorerGlobals(), and Entry::read_directory_base().


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