Public Member Functions | Public Attributes

ExplorerGlobals Struct Reference

structure containing global variables of Explorer More...

#include <globals.h>

Collaboration diagram for ExplorerGlobals:
Collaboration graph
[legend]

List of all members.

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 (  )

Definition at line 56 of file explorer.cpp.

References _cfStrFName, _desktop_mode, _hframeClass, _hInstance, _hMainWnd, _hwndDesktop, _hwndDesktopBar, _hwndShellView, _log, and _prescan_nodes.

{
    _hInstance = 0;
    _cfStrFName = 0;

#ifndef ROSSHELL
    _hframeClass = 0;
    _hMainWnd = 0;
    _desktop_mode = false;
    _prescan_nodes = false;
#endif

    _log = NULL;
#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003)
    _SHRestricted = 0;
#endif
    _hwndDesktopBar = 0;
    _hwndShellView = 0;
    _hwndDesktop = 0;
}

Member Function Documentation

ExplorerGlobals::DWORD ( STDAPICALLTYPE *  _SHRestricted )

Referenced by init().

Here is the caller graph for this function:

XMLPos ExplorerGlobals::get_cfg ( const char *  path )

Definition at line 132 of file explorer.cpp.

References _cfg, XMLStorage::XMLPos::create_relative(), and XMLStorage::XMLPos::smart_create().

{
    XMLPos cfg_pos(&_cfg);

    cfg_pos.smart_create("explorer-cfg");
    cfg_pos.create_relative(path);

    return cfg_pos;
}

Here is the call graph for this function:

XMLPos ExplorerGlobals::get_cfg (  )

Definition at line 123 of file explorer.cpp.

References _cfg, and XMLStorage::XMLPos::smart_create().

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

{
    XMLPos cfg_pos(&_cfg);

    cfg_pos.smart_create("explorer-cfg");

    return cfg_pos;
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ExplorerGlobals::init ( HINSTANCE  hInstance )

Definition at line 78 of file explorer.cpp.

References _hInstance, _icon_cache, DWORD(), IconCache::init(), and TEXT.

Referenced by _tWinMain().

{
    _hInstance = hInstance;

#ifndef __MINGW32__ // SHRestricted() missing in MinGW (as of 29.10.2003)
    _SHRestricted = (DWORD(STDAPICALLTYPE*)(RESTRICTIONS)) GetProcAddress(GetModuleHandle(TEXT("SHELL32")), "SHRestricted");
#endif

    _icon_cache.init();
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ExplorerGlobals::read_persistent (  )

Definition at line 90 of file explorer.cpp.

References _cfg, _cfg_dir, _cfg_path, XMLStorage::XMLDoc::_errors, _favorites, _favorites_path, _hwndDesktop, Favorites::import_IE_favorites(), String::printf(), Favorites::read(), XMLStorage::XMLDoc::read_file(), XMLStorage::XMLErrorList::str(), TEXT, and Favorites::write().

Referenced by _tWinMain().

{
     // read configuration file
    _cfg_dir.printf(TEXT("%s\\ReactOS"), (LPCTSTR)SpecialFolderFSPath(CSIDL_APPDATA,0));
    _cfg_path.printf(TEXT("%s\\ros-explorer-cfg.xml"), _cfg_dir.c_str());

    if (!_cfg.read_file(_cfg_path)) {
        if (!_cfg._errors.empty())
            MessageBox(_hwndDesktop, _cfg._errors.str(),
                        TEXT("ROS Explorer - reading user settings"), MB_OK);

        _cfg.read_file(TEXT("explorer-cfg-template.xml"));
    }

     // read bookmarks
    _favorites_path.printf(TEXT("%s\\ros-explorer-bookmarks.xml"), _cfg_dir.c_str());

    if (!_favorites.read(_favorites_path)) {
        _favorites.import_IE_favorites(0);
        _favorites.write(_favorites_path);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

void ExplorerGlobals::write_persistent (  )

Definition at line 113 of file explorer.cpp.

References _cfg, _cfg_dir, _cfg_path, _favorites, _favorites_path, RecursiveCreateDirectory(), Favorites::write(), and XMLStorage::XMLDoc::write_file().

Referenced by _tWinMain().

Here is the call graph for this function:

Here is the caller graph for this function:


Member Data Documentation

Definition at line 295 of file globals.h.

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

Definition at line 296 of file globals.h.

Referenced by read_persistent(), and write_persistent().

Definition at line 297 of file globals.h.

Referenced by read_persistent(), and write_persistent().

Definition at line 271 of file globals.h.

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

Definition at line 276 of file globals.h.

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

Definition at line 293 of file globals.h.

Referenced by _tWinMain(), QuickLaunchBar::AddShortcuts(), and DesktopBar::Command().

Definition at line 300 of file globals.h.

Referenced by read_persistent(), and write_persistent().

Definition at line 286 of file globals.h.

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

Definition at line 274 of file globals.h.

Referenced by SDIMainFrame::Create(), MDIMainFrame::Create(), and ExplorerGlobals().

Definition at line 280 of file globals.h.

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

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:

ROS Explorer Source Code Documentation
generated on 02.01.2013 by doxygen

ROS Explorer Homepage