diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-11-28 22:16:39 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-11-28 22:16:39 +0000 |
commit | 9eb3c0612e792949d450509236bf12500c559eb6 (patch) | |
tree | ebd1322189ba79411db080c4060c855cddacc45f /src/corelib | |
parent | b2049165bfcc025e616674375309e3bf16e0e621 (diff) | |
download | fpGUI-9eb3c0612e792949d450509236bf12500c559eb6.tar.xz |
* Implemented a Command pattern interface.
* Added CommandHandler support to TfpgButton.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/gfx_command_intf.pas | 27 | ||||
-rw-r--r-- | src/corelib/x11/fpgfx_package.lpk | 6 | ||||
-rw-r--r-- | src/corelib/x11/fpgfx_package.pas | 3 |
3 files changed, 34 insertions, 2 deletions
diff --git a/src/corelib/gfx_command_intf.pas b/src/corelib/gfx_command_intf.pas new file mode 100644 index 00000000..1313b45e --- /dev/null +++ b/src/corelib/gfx_command_intf.pas @@ -0,0 +1,27 @@ +unit gfx_command_intf; + +{$mode objfpc}{$H+} +{$INTERFACES CORBA} + +interface + + +type + ICommand = interface(IInterface) + ['{28D72102-D883-41A1-9585-D86B24D9C628}'] + procedure Execute; + end; + + + ICommandHolder = interface(IInterface) + ['{695BA6E1-1120-42D4-A2C3-54F98D5CDA46}'] + function GetCommand: ICommand; + procedure SetCommand(ACommand: ICommand); + end; + + +implementation + + +end. + diff --git a/src/corelib/x11/fpgfx_package.lpk b/src/corelib/x11/fpgfx_package.lpk index c5aaf68a..538d4545 100644 --- a/src/corelib/x11/fpgfx_package.lpk +++ b/src/corelib/x11/fpgfx_package.lpk @@ -24,7 +24,7 @@ <License Value="Modified LGPL "/> <Version Minor="5" Release="1"/> - <Files Count="16"> + <Files Count="17"> <Item1> <Filename Value="x11_xft.pas"/> <UnitName Value="x11_xft"/> @@ -89,6 +89,10 @@ <Filename Value="../gfx_strings.pas"/> <UnitName Value="gfx_strings"/> </Item16> + <Item17> + <Filename Value="../gfx_command_intf.pas"/> + <UnitName Value="gfx_command_intf"/> + </Item17> </Files> <RequiredPkgs Count="1"> <Item1> diff --git a/src/corelib/x11/fpgfx_package.pas b/src/corelib/x11/fpgfx_package.pas index 58a3fcac..d3ec9058 100644 --- a/src/corelib/x11/fpgfx_package.pas +++ b/src/corelib/x11/fpgfx_package.pas @@ -9,7 +9,8 @@ interface uses x11_xft, x11_keyconv, gfxbase, gfx_x11, fpgfx, gfx_stdimages, gfx_imgfmt_bmp, gfx_widget, gfx_UTF8utils, gfx_extinterpolation, gfx_cmdlineparams, - gfx_clipboard, gfx_utils, gfx_popupwindow, gfx_impl, gfx_strings; + gfx_clipboard, gfx_utils, gfx_popupwindow, gfx_impl, gfx_strings, + gfx_command_intf; implementation |