summaryrefslogtreecommitdiff
path: root/src/corelib
diff options
context:
space:
mode:
authorGraeme Geldenhuys <graeme@mastermaths.co.za>2010-04-07 12:32:59 +0200
committerGraeme Geldenhuys <graeme@mastermaths.co.za>2010-04-07 12:32:59 +0200
commit2b0bb6d1167e479404bd5d616f4d6155b1a92255 (patch)
tree364ebdb5572305754a0fb383b08e9240fb946abe /src/corelib
parent063cf4313bff63e6ec61596e681ac9674b1b7a49 (diff)
downloadfpGUI-2b0bb6d1167e479404bd5d616f4d6155b1a92255.tar.xz
ModalResult changed to a enum type
* Replaced all magic number modal results with actual enum values * UI Designer now uses enum combolist for ModalResult type in Object Inspector. * UI Designer now handles default values of ModalResult property correctly.
Diffstat (limited to 'src/corelib')
-rw-r--r--src/corelib/fpg_base.pas18
1 files changed, 4 insertions, 14 deletions
diff --git a/src/corelib/fpg_base.pas b/src/corelib/fpg_base.pas
index c592e6e7..b3595300 100644
--- a/src/corelib/fpg_base.pas
+++ b/src/corelib/fpg_base.pas
@@ -32,7 +32,6 @@ type
TfpgColor = type longword; // Always in RRGGBB (Alpha, Red, Green, Blue) format!!
TfpgString = type string;
TfpgChar = type string[4];
- TfpgModalResult = Low(integer)..MaxInt;
PPoint = ^TPoint;
@@ -59,6 +58,10 @@ type
TClipboardKeyType = (ckNone, ckCopy, ckPaste, ckCut);
+ // If you have to convert this to an Integer, mrNone = 0 etc.
+ TfpgModalResult = (mrNone, mrOK, mrCancel, mrYes, mrNo, mrAbort, mrRetry,
+ mrIgnore, mrAll, mrNoToAll, mrYesToAll);
+
const
MOUSE_LEFT = 1;
MOUSE_RIGHT = 3;
@@ -90,19 +93,6 @@ const
// The special keys, based on the well-known keyboard scan codes
{$I keys.inc}
- { TfpgModalResult values }
- mrNone = 0;
- mrOk = mrNone + 1;
- mrCancel = mrOk + 1;
- mrYes = mrCancel + 1;
- mrNo = mrYes + 1;
- mrAbort = mrNo + 1;
- mrRetry = mrAbort + 1;
- mrIgnore = mrRetry + 1;
- mrAll = mrIgnore + 1;
- mrNoToAll = mrAll + 1;
- mrYesToAll = mrNoToAll + 1;
-
{ Default fpGUI help viewer }
FPG_HELPVIEWER = 'docview';