ReactOS  0.4.14-dev-50-g13bb5e2
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;
70  _hwndDesktopBar = 0;
71  _hwndShellView = 0;
72  _hwndDesktop = 0;
73 }
ATOM _hframeClass
Definition: globals.h:274
HWND _hwndShellView
Definition: globals.h:288
bool _desktop_mode
Definition: globals.h:276
smooth NULL
Definition: ftsmooth.c:416
HWND _hwndDesktopBar
Definition: globals.h:287
bool _prescan_nodes
Definition: globals.h:277
UINT _cfStrFName
Definition: globals.h:271
HINSTANCE _hInstance
Definition: globals.h:270
HWND _hMainWnd
Definition: globals.h:275
FILE * _log
Definition: globals.h:280
HWND _hwndDesktop
Definition: globals.h:289

Member Function Documentation

◆ DWORD()

ExplorerGlobals::DWORD ( STDAPICALLTYPE _SHRestricted)

Referenced by init().

◆ 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 }
iterator for XML trees
Definition: xmlstorage.h:1493
XMLDoc _cfg
Definition: globals.h:293

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 }
iterator for XML trees
Definition: xmlstorage.h:1493
XMLDoc _cfg
Definition: globals.h:293
Definition: services.c:325

◆ 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");
80  _icon_cache.init();
81 }
void init()
Definition: explorer.cpp:381
RESTRICTIONS
Definition: shlobj.h:1537
HINSTANCE hInstance
Definition: charmap.c:20
HINSTANCE _hInstance
Definition: globals.h:270
#define STDAPICALLTYPE
Definition: guid.c:3
#define TEXT(s)
Definition: k32.h:26
#define GetModuleHandle
Definition: winbase.h:3644
#define GetProcAddress(x, y)
Definition: compat.h:410
DWORD(STDAPICALLTYPE *_SHRestricted)(RESTRICTIONS)
IconCache _icon_cache
Definition: globals.h:285

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()) {
93  _cfg._errors.str(),
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 }
bool read(LPCTSTR path)
read XBEL bookmark file
Definition: favorites.cpp:425
String _cfg_path
Definition: globals.h:295
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
file system path of special folder
String _cfg_dir
Definition: globals.h:294
bool read_file(LPCTSTR path)
Definition: xmlstorage.h:2741
void write(LPCTSTR path) const
write XBEL bookmark file
Definition: favorites.cpp:448
XMLDoc _cfg
Definition: globals.h:293
#define CSIDL_APPDATA
Definition: shlobj.h:2028
Favorites _favorites
Definition: globals.h:297
#define MessageBox
Definition: winuser.h:5723
bool import_IE_favorites(HWND hwnd)
import Internet Explorer bookmarks from Favorites folder
Definition: favorites.cpp:465
#define TEXT(s)
Definition: k32.h:26
#define MB_OK
Definition: winuser.h:784
XMLErrorList _errors
Definition: xmlstorage.h:2835
HWND _hwndDesktop
Definition: globals.h:289
String _favorites_path
Definition: globals.h:298
XS_String str() const
return merged error strings
Definition: xmlstorage.cpp:820

Referenced by _tWinMain().

◆ write_persistent()

void ExplorerGlobals::write_persistent ( )

Definition at line 109 of file explorer.cpp.

110 {
111  // write configuration file
113 
116 }
String _cfg_path
Definition: globals.h:295
String _cfg_dir
Definition: globals.h:294
void write(LPCTSTR path) const
write XBEL bookmark file
Definition: favorites.cpp:448
XMLDoc _cfg
Definition: globals.h:293
Favorites _favorites
Definition: globals.h:297
BOOL RecursiveCreateDirectory(LPCTSTR path_in)
Definition: utility.cpp:394
bool write_file(LPCTSTR path, WRITE_MODE mode=FORMAT_SMART) const
Definition: xmlstorage.h:2820
String _favorites_path
Definition: globals.h:298

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 WinDirectory::read_directory(), and ShellDirectory::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: