mirror of
https://gitlab.com/freepascal.org/lazarus/lazarus.git
synced 2025-04-07 12:18:03 +02:00
LCL: expose widgetset independent dialog: DefaultPromptDialog, DefaultQuestionDialog, DefaultMessageBox and DefaultInputDialog
git-svn-id: branches/fixes_1_6@50573 -
This commit is contained in:
parent
1523a8b514
commit
e7228468d7
@ -515,14 +515,24 @@ function MessageDlgPosHelp(const aMsg: string; DlgType: TMsgDlgType;
|
||||
const HelpFileName: string): TModalResult; overload;
|
||||
function CreateMessageDialog(const Msg: string; DlgType: TMsgDlgType;
|
||||
Buttons: TMsgDlgButtons): TForm; overload;
|
||||
function DefaultPromptDialog(const DialogCaption,
|
||||
DialogMessage: String;
|
||||
DialogType: longint; Buttons: PLongint;
|
||||
ButtonCount, DefaultIndex, EscapeResult: Longint;
|
||||
UseDefaultPos: boolean;
|
||||
X, Y: Longint): Longint;// widgetset independent implementation, see PromptDialogFunction
|
||||
|
||||
function QuestionDlg(const aCaption, aMsg: string; DlgType: TMsgDlgType;
|
||||
Buttons: array of const; HelpCtx: Longint): TModalResult; overload;
|
||||
function QuestionDlg(const aCaption, aMsg: string; DlgType: TMsgDlgType;
|
||||
Buttons: array of const; const HelpKeyword: string): TModalResult; overload;
|
||||
function DefaultQuestionDialog(const aCaption, aMsg: string; DlgType: LongInt;
|
||||
Buttons: TDialogButtons; HelpCtx: Longint): LongInt;// widgetset independent implementation, see QuestionDialogFunction
|
||||
|
||||
procedure ShowMessage(const aMsg: string);
|
||||
procedure ShowMessageFmt(const aMsg: string; Params: array of const);
|
||||
procedure ShowMessagePos(const aMsg: string; X, Y: Integer);
|
||||
function DefaultMessageBox(Text, Caption: PChar; Flags: Longint) : Integer;// widgetset independent implementation, see MessageBoxFunction
|
||||
|
||||
function InputBox(const ACaption, APrompt, ADefault : String) : String;
|
||||
function PasswordBox(const ACaption, APrompt : String) : String;
|
||||
@ -549,6 +559,8 @@ function InputQuery(const ACaption, APrompt : String; MaskInput : Boolean; var V
|
||||
function InputQuery(const ACaption, APrompt : String; var Value : String) : Boolean;
|
||||
function InputQuery(const ACaption: string; const APrompts: array of string;
|
||||
var AValues: array of string; ACloseEvent: TInputCloseQueryEvent = nil): boolean;
|
||||
function DefaultInputDialog(const InputCaption, InputPrompt : String;
|
||||
MaskInput : Boolean; var Value : String) : Boolean;// widgetset independent implementation, see InputDialogFunction
|
||||
|
||||
function ExtractColorIndexAndColor(const AColorList: TStrings; const AIndex: Integer;
|
||||
out ColorIndex: Integer; out ColorValue: TColor): Boolean;
|
||||
@ -625,7 +637,7 @@ begin
|
||||
RegisterComponents('Misc',[TColorButton]);
|
||||
end;
|
||||
|
||||
function ShowMessageBox(Text, Caption: PChar; Flags: Longint) : Integer;
|
||||
function DefaultMessageBox(Text, Caption: PChar; Flags: Longint) : Integer;
|
||||
var
|
||||
DlgType : TMsgDlgType;
|
||||
Buttons : TMsgDlgButtons;
|
||||
@ -745,10 +757,10 @@ end;
|
||||
|
||||
|
||||
initialization
|
||||
Forms.MessageBoxFunction := @ShowMessageBox;
|
||||
InterfaceBase.InputDialogFunction := @ShowInputDialog;
|
||||
InterfaceBase.PromptDialogFunction := @ShowPromptDialog;
|
||||
InterfaceBase.QuestionDialogFunction := @ShowQuestionDialog;
|
||||
Forms.MessageBoxFunction := @DefaultMessageBox;
|
||||
InterfaceBase.InputDialogFunction := @DefaultInputDialog;
|
||||
InterfaceBase.PromptDialogFunction := @DefaultPromptDialog;
|
||||
InterfaceBase.QuestionDialogFunction := @DefaultQuestionDialog;
|
||||
|
||||
finalization
|
||||
InterfaceBase.InputDialogFunction := nil;
|
||||
|
@ -19,7 +19,7 @@ begin
|
||||
Result := Screen.PrimaryMonitor;
|
||||
end;
|
||||
|
||||
function ShowInputDialog(const InputCaption, InputPrompt : String;
|
||||
function DefaultInputDialog(const InputCaption, InputPrompt : String;
|
||||
MaskInput : Boolean; var Value : String) : Boolean;
|
||||
var
|
||||
Form: TForm;
|
||||
|
@ -498,7 +498,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function ShowPromptDialog(const DialogCaption,
|
||||
function DefaultPromptDialog(const DialogCaption,
|
||||
DialogMessage: String;
|
||||
DialogType: longint; Buttons: PLongint;
|
||||
ButtonCount, DefaultIndex, EscapeResult: Longint;
|
||||
@ -815,7 +815,7 @@ begin
|
||||
end;
|
||||
|
||||
|
||||
function ShowQuestionDialog(const aCaption, aMsg: string; DlgType: LongInt;
|
||||
function DefaultQuestionDialog(const aCaption, aMsg: string; DlgType: LongInt;
|
||||
Buttons: TDialogButtons; HelpCtx: Longint): LongInt;
|
||||
{ Show a dialog with aCaption as Title, aMsg as Text, DlgType as Icon,
|
||||
HelpCtx as Help context and Buttons to define the shown buttons and their
|
||||
|
Loading…
Reference in New Issue
Block a user