summaryrefslogtreecommitdiff
path: root/include/delphi/m_options.inc
diff options
context:
space:
mode:
authorAlexey Kulakov <panda75@bk.ru>2012-07-04 20:10:29 +0000
committerAlexey Kulakov <panda75@bk.ru>2012-07-04 20:10:29 +0000
commit65e002b63efdb00571d0ba4ec1a73b14e1d7d3a0 (patch)
treed96b2f52ca3c89172f269cdb172c89cf6141d69c /include/delphi/m_options.inc
parentd7f143dba9e53347a1d7897bcd3989751c7f45f8 (diff)
Pascal headers moved to include\delphi directory (with small updates)
removed deprecated m_mwclc.h file and link on it in AutoShutdown plugin git-svn-id: http://svn.miranda-ng.org/main/trunk@763 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'include/delphi/m_options.inc')
-rw-r--r--include/delphi/m_options.inc212
1 files changed, 117 insertions, 95 deletions
diff --git a/include/delphi/m_options.inc b/include/delphi/m_options.inc
index 23d891a81c..e4440cd2e4 100644
--- a/include/delphi/m_options.inc
+++ b/include/delphi/m_options.inc
@@ -1,109 +1,131 @@
-(*
-
-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.
+{
+ 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}
-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.
+const
+ { Opt/Initialise
+ The user opened the options dialog. Modules should do whatever initialisation
+ they need and call opt/addpage one or more times if they want pages displayed
+ in the options dialog
+ wParam=addInfo
+ lParam=0
+ addInfo should be passed straight to the wParam of opt/addpage
+ }
+ ME_OPT_INITIALISE:PAnsiChar = 'Opt/Initialise';
+
+ { Opt/AddPage
+ Must only be called during an opt/initialise hook
+ Adds a page to the options dialog
+ wParam=addInfo
+ lParam=(LPARAM)(OPTIONSDIALOGPAGE )odp
+ addInfo must have come straight from the wParam of opt/initialise
+ Pages in the options dialog operate just like pages in property sheets. See the
+ Microsoft documentation for details on how they operate.
+ Strings in the structure can be released as soon as the service returns, but
+ icons must be kept around. This is not a problem if you're loading them from a
+ resource.
+ Prior to v0.1.2.1 the options dialog would resize to fit the largest page, but
+ since then it is fixed in size. The largest page that fits neatly is 314x240
+ DLUs.
+ }
-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.
+type
+ POPTIONSDIALOGPAGE = ^TOPTIONSDIALOGPAGE;
+ TOPTIONSDIALOGPAGE = record
+ cbSize :int;
+ position :int; // a position number, lower numbers are topmost
+ szTitle :TChar; // [TRANSLATED-BY-CORE]
+ pfnDlgProc :pointer;
+ pszTemplate :PAnsiChar;
+ hInstance :THANDLE;
+ hIcon :HICON; // v0.1.0.1+
+ szGroup :TChar; // v0.1.0.1+ [TRANSLATED-BY-CORE]
+ groupPosition :int; // v0.1.0.1+
+ hGroupIcon :HICON; // v0.1.0.1+
+ flags :dword; // v0.1.2.1+
+ nIDBottomSimpleControl:int; // v0.1.2.1+
+ // if in simple mode the dlg will be cut off after this control,
+ // 0 to disable
+ nIDRightSimpleControl :int; // v0.1.2.1+
+ // if in simple mode the dlg will be cut off after this control,
+ // 0 to disable
+ expertOnlyControls :^uint;
+ nExpertOnlyControls :int; // v0.1.2.1+
+ // these controls will be hidden in simple mode. Array must remain valid
+ // for duration of dlg.
+ szTab :TChar; // v0.6.0.0+ [TRANSLATED-BY-CORE]
+ dwInitParam :LPARAM; // v0.8.0.0+ a value to pass to lParam of WM_INITDIALOG message
+ hLangpack :int;
+ end;
-*)
+const
+ {$IFNDEF WIN64}
+ OPTIONPAGE_OLD_SIZE = 40;
+ OPTIONPAGE_OLD_SIZE2 = 60;
+ OPTIONPAGE_OLD_SIZE3 = 64;
+ {$ELSE}
+ OPTIONPAGE_OLD_SIZE = SIZEOF(TOPTIONSDIALOGPAGE);
+ OPTIONPAGE_OLD_SIZE2 = SIZEOF(TOPTIONSDIALOGPAGE);
+ OPTIONPAGE_OLD_SIZE3 = SIZEOF(TOPTIONSDIALOGPAGE);
+ {$ENDIF}
-{$IFNDEF M_OPTIONS}
-{$DEFINE M_OPTIONS}
+const
+ ODPF_SIMPLEONLY = 1; // page is only shown when in simple mode
+ ODPF_EXPERTONLY = 2; // " expert mode
+ ODPF_BOLDGROUPS = 4; // give group box titles a bold font
+ ODPF_UNICODE = 8; // string fields in OPTIONSDIALOGPAGE are WCHAR*
+ ODPF_USERINFOTAB = 16; // options page is tabbed
+ ODPF_DONTTRANSLATE = 32; // do not translate option page title
const
+ PSN_EXPERTCHANGED = 2; //sent to pages via WM_NOTIFY when the expert checkbox is clicked. lParam=new state
- {
- 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;
+ PSM_ISEXPERT = WM_USER+101; //returns true/false
+ PSM_GETBOLDFONT = WM_USER+102; //returns HFONT used for group box titles
-type
+ MS_OPT_ADDPAGE:PAnsiChar = 'Opt/AddPage';
- 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;
+ { Opens the options dialog, optionally at the specified page v0.1.2.1+
+ wParam=0
+ lParam=(LPARAM)(OPENOPTIONSDIALOG*)&ood;
+ Returns 0 on success, nonzero on failure
+ The behaviour if the options dialog is already open is that it will just be
+ activated, the page won't be changed. This may change in the future. }
+type
+ POPENOPTIONSDIALOG = ^TOPENOPTIONSDIALOG;
+ TOPENOPTIONSDIALOG = record
+ cbSize :int;
+ pszGroup:PAnsiChar; // set to NULL if it's a root item
+ pszPage :PAnsiChar; // set to NULL to just open the options at no specific page
+ pszTab :PAnsiChar; // set to NULL to just open the options at no specific tab
+ end;
const
+ MS_OPT_OPENOPTIONS:PAnsiChar = 'Opt/OpenOptions';
+
+//Opens the options dialog, with only specified page v0.8.0.x+
+ MS_OPT_OPENOPTIONSPAGE = 'Opt/OpenOptionsPage';
- { 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);
+ SETTING_SHOWEXPERT_DEFAULT = 1;
{$ENDIF}