summaryrefslogtreecommitdiff
path: root/plugins/!NotAdopted/Chess4Net/MI/MirandaINC/m_options.inc
blob: 23d891a81c09f443bfb07cd9620d66074b4f2b09 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
(*

Miranda IM: the free IM client for Microsoft* Windows*

Copyright 2000-2003 Miranda ICQ/IM project,
all portions of this codebase are copyrighted to the people
listed in contributors.txt.

This program is free software; you can redistribute it and/or
modify it under the terms of the GNU General Public License
as published by the Free Software Foundation; either version 2
of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
GNU General Public License for more details.

You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.

*)

{$IFNDEF M_OPTIONS}
{$DEFINE M_OPTIONS}

const

    {
        wParam : addinfo
        lParam : 0
        Affects: The user opened the options dialog, see notes
        Notes  : Modules should do whatever initalisation they need and call
                 MS_OPT_ADDPAGE with the wParam -- MS_OPT_ADDPAGE
                 can be called one or more times
                 if more than one page wants to be displayed.
    }
    ME_OPT_INITIALISE           = 'Opt/Initialise';

    {
        wParam : wParam from ME_OPT_INITIALISE
        lParam : Pointer to an initialised TOPTIONSDIALOGPAGE
        Affects: Adds a page to the options dialog, see notes
        Notes  : Strings in the structure can be released as soon as the
                 service returns -- but icons must be kept around, this iss
                 not a problem if you're loading theem from a resource.
                 -
                 This service should only be called within the ME_OPT_INITIALISE
                 event hook.
                 -
                 Pages in the options dialog operate just like pages in property
                 sheets, See the WinAPI documentation for details on how they operate.
        Version: Prior to v0.1.2.1 the options dialog would resize
                 to fit the largest page, but since then it's a fixed size
                 The largest page that fits neatly is 314x240 DLU's
                 -
                 Some of OPTIONSDIALOGPAGE's fields are version dependant.
    }
    MS_OPT_ADDPAGE                  = 'Opt/AddPage';

    { defacto size }

    OPTIONSDIALOGPAGE_V0100_SIZE    = $18;
    OPTIONSDIALOGPAGE_V0120_SIZE    = $28;

    { page is only shown when in 'simple' mode }
    ODPF_SIMPLEONLY                 = 1;
    { page is only shown when in 'expert' mode }
    ODPF_EXPERTONLY                 = 2;
    { give group box titles a bold font }
    ODPF_BOLDGROUPS                 = 4;

type

    POPTIONSDIALOGPAGE = ^TOPTIONSDIALOGPAGE;
    TOPTIONSDIALOGPAGE = record
        cbSize: int;
        position: int;                  // position number, lower numbers are top most
        pszTitle: PChar;
        pfnDlgProc: Pointer;            // DLGPROC prototype
        pszTemplate: PChar;
        hInstance: THandle;
        hIcon: THandle;                 // v0.1.0.1+
        pszGroup: PChar;                // v0.1.0.1+
        groupPosition: int;             // v0.1.0.1+
        hGroupIcon: THandle;            // v0.1.0.1+
        flags: DWORD;                   // v0.1.2.1+
        { if in simple mode the dialog will be cut off AFTER this control ID, 0
        for disable }
        nIDBottomSimpleControl: int;    // v0.1.2.1+
        { if in simple mode the dialog will cut off AFTER this control ID, 0 to disable }
        nIDRightSimpleControl: int;     // v0.1.2.1+
        { these controls will be hidden in simple mode, pointer to an array of ID's
        must remain valid for the duration of the dialog }
        expertOnlyControls: ^int;
        nExpertOnlyControls: int;       // v0.1.2.1+
    end;

const

    { sent to pages via WM_NOTIFY when the expert checkbox is clicked, lParam = new state }
    PSN_EXPERTCHANGED               = 2;
    { returns true/false }
    PSM_ISEXPERT                    = ($0400 + 101);
    { returns HFONT used for group box titles }
    PSM_GETBOLDFONT                 = ($0400 + 102);

{$ENDIF}