Public Types | Public Member Functions | Protected Member Functions

MdiSdiDlg Struct Reference

configuration dialog to choose between MDI and SDI mode More...

#include <settings.h>

Inheritance diagram for MdiSdiDlg:
Inheritance graph
[legend]
Collaboration diagram for MdiSdiDlg:
Collaboration graph
[legend]

List of all members.

Public Types

typedef ResizeController< Dialogsuper

Public Member Functions

 MdiSdiDlg (HWND hwnd)

Protected Member Functions

virtual int Command (int id, int code)

Detailed Description

configuration dialog to choose between MDI and SDI mode

Definition at line 91 of file settings.h.


Member Typedef Documentation

Reimplemented from ResizeController< Dialog >.

Definition at line 93 of file settings.h.


Constructor & Destructor Documentation

MdiSdiDlg::MdiSdiDlg ( HWND  hwnd )

Definition at line 234 of file settings.cpp.

References CenterWindow(), g_Globals, ExplorerGlobals::get_cfg(), IDC_MDI, IDC_SDI, and IDC_SEPARATE_SUBFOLDERS.

 :  super(hwnd)
{
    CenterWindow(hwnd);

    XMLPos explorer_options = g_Globals.get_cfg("general/explorer");
    bool mdi = XMLBool(explorer_options, "mdi", true);
    bool separateFolders = XMLBool(explorer_options, "separate-folders", true);

    int id = mdi? IDC_MDI: IDC_SDI;
    CheckDlgButton(hwnd, id, BST_CHECKED);
    SetFocus(GetDlgItem(hwnd, id));

    CheckDlgButton(hwnd, IDC_SEPARATE_SUBFOLDERS, separateFolders?BST_CHECKED:BST_UNCHECKED);
}

Here is the call graph for this function:


Member Function Documentation

int MdiSdiDlg::Command ( int  id,
int  code 
) [protected, virtual]

Reimplemented from Dialog.

Definition at line 250 of file settings.cpp.

References WindowHandle::_hwnd, g_Globals, ExplorerGlobals::get_cfg(), IDC_MDI, and IDC_SEPARATE_SUBFOLDERS.

{
    if (code == BN_CLICKED) {
        switch(id) {
          case IDOK: {
            bool mdi = IsDlgButtonChecked(_hwnd, IDC_MDI)==BST_CHECKED;
            bool separateFolders = IsDlgButtonChecked(_hwnd, IDC_SEPARATE_SUBFOLDERS)==BST_CHECKED;

            XMLPos explorer_options = g_Globals.get_cfg("general/explorer");

            XMLBoolRef(explorer_options, "mdi") = mdi;
            XMLBoolRef(explorer_options, "separate-folders") = separateFolders;
          } // fall through

          case IDCANCEL:
            EndDialog(_hwnd, id);
            break;
        }

        return 0;
    }

    return 1;
}

Here is the call graph for this function:


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