diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-09-13 10:45:08 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2007-09-13 10:45:08 +0000 |
commit | 60515a6cef02edd0ccab823569f10238c26f10c7 (patch) | |
tree | 7d913e6ed3f587509dcaa2cd81a88fb63982d125 /src/corelib | |
parent | 97c0f8c9a629842f647e19dc792c055895763f98 (diff) | |
download | fpGUI-60515a6cef02edd0ccab823569f10238c26f10c7.tar.xz |
* CoreLib: fpgApplication now has a Terminated property which terminates the
main event loop and application. Halt was just to harsh and objects never got
freed.
* GUI: Added a new INI Utils unit which introduces ReadOnly ini support and
can also save a form's state and position. You access the ini file via the
gINI singleton function. fpGUI Designer uses this.
* All example project now free there main forms correctly.
* Many bug fixes in GUI Designer. GUI Designer now also remembers the size and
location of most forms.
* Many of the GUI Designer forms are now maintained by the GUI Designer itself.
* GUI Designer: Started implementing a Recent Files feature so it is quicker to
open frequently used files.
Diffstat (limited to 'src/corelib')
-rw-r--r-- | src/corelib/fpgfx.pas | 2 | ||||
-rw-r--r-- | src/corelib/gdi/gfx_gdi.pas | 1 | ||||
-rw-r--r-- | src/corelib/gfxbase.pas | 2 | ||||
-rw-r--r-- | src/corelib/x11/gfx_x11.pas | 12 |
4 files changed, 12 insertions, 5 deletions
diff --git a/src/corelib/fpgfx.pas b/src/corelib/fpgfx.pas index a769b871..7ba8ed6e 100644 --- a/src/corelib/fpgfx.pas +++ b/src/corelib/fpgfx.pas @@ -707,7 +707,7 @@ procedure TfpgApplication.RunMessageLoop; begin repeat WaitWindowMessage(1000); - until False; + until Terminated; end; { TfpgFont } diff --git a/src/corelib/gdi/gfx_gdi.pas b/src/corelib/gdi/gfx_gdi.pas index 17a3fe3e..97b72460 100644 --- a/src/corelib/gdi/gfx_gdi.pas +++ b/src/corelib/gdi/gfx_gdi.pas @@ -708,6 +708,7 @@ constructor TfpgApplicationImpl.Create(const aparams: string); begin FIsInitialized := False; FDisplay := Windows.GetDC(0); + Terminated := False; with WindowClass do begin diff --git a/src/corelib/gfxbase.pas b/src/corelib/gfxbase.pas index d00f493f..0cac008d 100644 --- a/src/corelib/gfxbase.pas +++ b/src/corelib/gfxbase.pas @@ -369,6 +369,7 @@ type TfpgApplicationBase = class(TObject) private FMainForm: TfpgWindowBase; + FTerminated: boolean; FTopModalForm: TfpgWindowBase; protected FIsInitialized: Boolean; @@ -379,6 +380,7 @@ type property IsInitialized: boolean read FIsInitialized; property TopModalForm: TfpgWindowBase read FTopModalForm write FTopModalForm; property MainForm: TfpgWindowBase read FMainForm write FMainForm; + property Terminated: boolean read FTerminated write FTerminated; end; diff --git a/src/corelib/x11/gfx_x11.pas b/src/corelib/x11/gfx_x11.pas index d27a834c..23df9cbb 100644 --- a/src/corelib/x11/gfx_x11.pas +++ b/src/corelib/x11/gfx_x11.pas @@ -526,6 +526,7 @@ begin if FDisplay = nil then Exit; //==> + Terminated := False; DefaultScreen := XDefaultScreen(Display); RootWindow := XRootWindow(FDisplay, DefaultScreen); DefaultBackground := XBlackPixel(FDisplay, DefaultScreen); @@ -1101,13 +1102,16 @@ end; procedure TfpgWindowImpl.DoSetWindowVisible(const AValue: Boolean); begin - if AValue then begin - if not HandleIsValid then AllocateWindowHandle; + if AValue then + begin + if not HandleIsValid then + AllocateWindowHandle; XMapWindow(xapplication.Display, FWinHandle); Include(FWinFlags, xwsfMapped); end - else begin - if HandleIsValid and (xwsfMapped in FWinFlags) then + else + begin + if HandleIsValid and (xwsfMapped in FWinFlags) then XUnmapWindow(xapplication.Display, FWinHandle); end; end; |