diff options
author | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-21 10:52:27 +0000 |
---|---|---|
committer | graemeg <graemeg@ae50a9b5-8222-0410-bf8d-8a13f76226bf> | 2008-04-21 10:52:27 +0000 |
commit | b7c71ad5b36302fd86bcf739983b012477e5459d (patch) | |
tree | c6f9b2a98b4818487e7bb665bf92aeb1efe33be4 | |
parent | 8d6f135f33471624a87f6864f0c0879f0bd0ee3f (diff) | |
download | fpGUI-b7c71ad5b36302fd86bcf739983b012477e5459d.tar.xz |
* Added more handy scripts for cleaning out directories (linux only).
* Fixed some compiler warnings.
* Fixed some units where they override functions in parent classes were they we not supposed to.
-rwxr-xr-x | extras/cleanall.sh | 4 | ||||
-rwxr-xr-x | extras/cleanbuild.sh | 3 | ||||
-rwxr-xr-x | extras/cleansrc.sh | 4 | ||||
-rw-r--r-- | src/gui/gui_mru.pas | 7 | ||||
-rw-r--r-- | src/gui/gui_panel.pas | 56 | ||||
-rw-r--r-- | src/gui/gui_progressbar.pas | 6 | ||||
-rw-r--r-- | src/gui/gui_scrollbar.pas | 10 | ||||
-rw-r--r-- | src/gui/gui_trackbar.pas | 16 |
8 files changed, 32 insertions, 74 deletions
diff --git a/extras/cleanall.sh b/extras/cleanall.sh new file mode 100755 index 00000000..ee37882c --- /dev/null +++ b/extras/cleanall.sh @@ -0,0 +1,4 @@ +cd .. +find ./ \( -name '*.o' -o -name '*.ppu' -o -name '*.a' \) -exec rm {} \+ + + diff --git a/extras/cleanbuild.sh b/extras/cleanbuild.sh index 8a5a1df0..43cad476 100755 --- a/extras/cleanbuild.sh +++ b/extras/cleanbuild.sh @@ -1,5 +1,4 @@ -cd .. -find lib/ examples/ \( -name '*.o' -o -name '*.ppu' -o -name '*.a' \) -exec rm {} \+ +./cleanall.sh cd src ./build.sh cd ../examples/apps/uidesigner diff --git a/extras/cleansrc.sh b/extras/cleansrc.sh new file mode 100755 index 00000000..f7d2fa59 --- /dev/null +++ b/extras/cleansrc.sh @@ -0,0 +1,4 @@ +cd .. +find src/ \( -name '*.o' -o -name '*.ppu' -o -name '*.a' \) -exec rm {} \+ + + diff --git a/src/gui/gui_mru.pas b/src/gui/gui_mru.pas index 2baa25f8..b4523ba9 100644 --- a/src/gui/gui_mru.pas +++ b/src/gui/gui_mru.pas @@ -35,7 +35,7 @@ type FMaxItems: Word; FShowFullPath: boolean; FParentMenuItem: TfpgPopupMenu; - FIniFilePath: string; +// FIniFilePath: string; FOnClick: TMRUClickEvent; procedure SetMaxItems(const AValue: Word); // procedure SetIniFilePath(const AValue: string); @@ -80,8 +80,10 @@ procedure TfpgMRU.SetMaxItems(const AValue: Word); begin if AValue <> FMaxItems then begin - if AValue < 1 then FMaxItems := 1 + if AValue < 1 then + FMaxItems := 1 else + begin if AValue > MaxInt then FMaxItems := High(Word) - 1 else @@ -95,6 +97,7 @@ begin FItems.EndUpdate; end; end; + end; { if/else } end; end; diff --git a/src/gui/gui_panel.pas b/src/gui/gui_panel.pas index 28c63500..085e77dc 100644 --- a/src/gui/gui_panel.pas +++ b/src/gui/gui_panel.pas @@ -42,10 +42,7 @@ type FPanelShape: TPanelShape; FPanelStyle: TPanelStyle; procedure SetPanelStyle(const AValue: TPanelStyle); - function GetBackgroundColor: Tfpgcolor; - procedure SetBackgroundColor(const AValue: Tfpgcolor); protected - property BackgroundColor: TfpgColor read GetBackgroundColor write SetBackgroundColor; property Style: TPanelStyle read FPanelStyle write SetPanelStyle default bsRaised; public constructor Create(AOwner: TComponent); override; @@ -78,8 +75,6 @@ type procedure SetLayout(const AValue: TLayout); function GetText: string; procedure SetText(const AValue: string); - function GetTextColor: Tfpgcolor; - procedure SetTextColor(const AValue: Tfpgcolor); function GetFontDesc: string; procedure SetFontDesc(const AValue: string); function GetLineSpace: integer; @@ -101,7 +96,7 @@ type property Layout: TLayout read GetLayout write SetLayout default tlCenter; property Style; property Text: string read GetText write SetText; - property TextColor: Tfpgcolor read GetTextColor write SetTextColor; + property TextColor; property LineSpace: integer read GetLineSpace write SetLineSpace default 2; property Margin: integer read GetMargin write SetMargin default 2; property WrapText: boolean read GetWrapText write SetWrapText default False; @@ -118,8 +113,6 @@ type procedure SetAlignment(const AValue: TAlignment); function GetText: string; procedure SetText(const AValue: string); - function GetTextColor: Tfpgcolor; - procedure SetTextColor(const AValue: Tfpgcolor); function GetFontDesc: string; procedure SetFontDesc(const AValue: string); function GetMargin: integer; @@ -136,7 +129,7 @@ type property FontDesc: string read GetFontDesc write SetFontDesc; property Style; property Text: string read GetText write SetText; - property TextColor: Tfpgcolor read GetTextColor write SetTextColor; + property TextColor; property Margin: integer read GetMargin write SetMargin default 2; property OnClick; property OnDoubleClick; @@ -210,20 +203,6 @@ begin Repaint; end; -function TfpgAbstractPanel.GetBackgroundColor: Tfpgcolor; -begin - Result := FBackgroundColor; -end; - -procedure TfpgAbstractPanel.SetBackgroundColor(const AValue: Tfpgcolor); -begin - if FBackgroundColor <> AValue then - begin - FBackgroundColor := AValue; - Repaint; - end; -end; - constructor TfpgAbstractPanel.Create(AOwner: TComponent); begin inherited Create(AOwner); @@ -247,8 +226,6 @@ begin end; procedure TfpgBevel.HandlePaint; -var - r: TfpgRect; begin Canvas.BeginDraw; inherited HandlePaint; @@ -335,20 +312,6 @@ begin end; end; -function TfpgPanel.GetTextColor: Tfpgcolor; -begin - Result := FTextColor; -end; - -procedure TfpgPanel.SetTextColor(const AValue: Tfpgcolor); -begin - if FTextColor <> AValue then - begin - FTextColor := AValue; - Repaint; - end; -end; - function TfpgPanel.GetFontDesc: string; begin Result := FFont.FontDesc; @@ -404,7 +367,6 @@ begin end; procedure TfpgPanel.HandlePaint; var - r: TfpgRect; lTxtFlags: TFTextFlags; begin Canvas.BeginDraw; @@ -508,20 +470,6 @@ begin end; end; -function TfpgGroupBox.GetTextColor: Tfpgcolor; -begin - Result := FTextColor; -end; - -procedure TfpgGroupBox.SetTextColor(const AValue: Tfpgcolor); -begin - if FTextColor <> AValue then - begin - FTextColor := AValue; - Repaint; - end; -end; - function TfpgGroupBox.GetFontDesc: string; begin Result := FFont.FontDesc; diff --git a/src/gui/gui_progressbar.pas b/src/gui/gui_progressbar.pas index ca987bad..f7203272 100644 --- a/src/gui/gui_progressbar.pas +++ b/src/gui/gui_progressbar.pas @@ -39,14 +39,14 @@ type FFont: TfpgFont; procedure SetMax(const AValue: longint); procedure SetMin(const AValue: longint); - procedure SetPosition(const AValue: longint); + procedure SetPBPosition(const AValue: longint); procedure SetShowCaption(const AValue: boolean); procedure SetStep(const AValue: longint); protected procedure HandlePaint; override; property Max: longint read FMax write SetMax default 100; property Min: longint read FMin write SetMin default 0; - property Position: longint read FPosition write SetPosition default 0; + property Position: longint read FPosition write SetPBPosition default 0; property Step: longint read FStep write SetStep; // property FontName: string read GetFontName write SetFontName; property ShowCaption: boolean read FShowCaption write SetShowCaption; @@ -104,7 +104,7 @@ begin RePaint; end; -procedure TfpgCustomProgressBar.SetPosition(const AValue: longint); +procedure TfpgCustomProgressBar.SetPBPosition(const AValue: longint); begin if FPosition = AValue then Exit; //==> diff --git a/src/gui/gui_scrollbar.pas b/src/gui/gui_scrollbar.pas index 35d3994b..86f6a77f 100644 --- a/src/gui/gui_scrollbar.pas +++ b/src/gui/gui_scrollbar.pas @@ -51,7 +51,7 @@ type FScrollbarDownPart: TfpgScrollBarPart; procedure SetMax(const AValue: integer); procedure SetMin(const AValue: integer); - procedure SetPosition(const AValue: integer); + procedure SetSBPosition(const AValue: integer); procedure Step(ASteps: Integer); procedure StepPage(ASteps: Integer); procedure StepStart; @@ -86,7 +86,7 @@ type destructor Destroy; override; procedure RepaintSlider; property PageSize: integer read FPageSize write FPageSize default 5; - property Position: integer read FPosition write SetPosition default 10; + property Position: integer read FPosition write SetSBPosition default 10; property ScrollStep: integer read FScrollStep write FScrollStep default 1; // property LargeChange: Integer read FLargeChange write FLargeChange default 0; property Min: integer read FMin write SetMin default 0; @@ -175,7 +175,7 @@ begin StepStart; end; -procedure TfpgScrollBar.SetPosition(const AValue: integer); +procedure TfpgScrollBar.SetSBPosition(const AValue: integer); begin if AValue < FMin then FPosition := FMin @@ -200,12 +200,12 @@ end; procedure TfpgScrollBar.StepStart; begin - SetPosition(FMin) + SetSBPosition(FMin) end; procedure TfpgScrollBar.StepEnd; begin - SetPosition(FMax); + SetSBPosition(FMax); end; procedure TfpgScrollBar.ScrollTimer(Sender: TObject); diff --git a/src/gui/gui_trackbar.pas b/src/gui/gui_trackbar.pas index 6f80661a..b067f99f 100644 --- a/src/gui/gui_trackbar.pas +++ b/src/gui/gui_trackbar.pas @@ -56,7 +56,7 @@ type procedure DoChange; procedure SetMax(const AValue: integer); procedure SetMin(const AValue: integer); - procedure SetPosition(const AValue: integer); + procedure SetTBPosition(const AValue: integer); procedure SetSliderSize(const AValue: integer); procedure FixMinMaxOrder; procedure FixPositionLimits; @@ -71,7 +71,7 @@ type property BackgroundColor; property Min: integer read FMin write SetMin default 0; property Max: integer read FMax write SetMax default 10; - property Position: integer read FPosition write SetPosition default 0; + property Position: integer read FPosition write SetTBPosition default 0; property SliderSize: integer read FSliderSize write SetSliderSize default 11; property Orientation: TOrientation read FOrientation write FOrientation default orHorizontal; property TabOrder; @@ -97,7 +97,7 @@ type FFont: TfpgFont; procedure SetMax(const AValue: integer); procedure SetMin(const AValue: integer); - procedure SetPosition(const AValue: integer); + procedure SetTBPosition(const AValue: integer); procedure SetShowPosition(const AValue: boolean); function GetTextWidth: TfpgCoord; protected @@ -113,7 +113,7 @@ type destructor Destroy; override; published property BackgroundColor; - property Position: integer read FPosition write SetPosition default 0; + property Position: integer read FPosition write SetTBPosition default 0; property ScrollStep: integer read FScrollStep write FScrollStep default 1; property Min: integer read FMin write SetMin default 0; property Max: integer read FMax write SetMax default 100; @@ -151,7 +151,7 @@ begin RePaint; end; -procedure TfpgTrackBarExtra.SetPosition(const AValue: integer); +procedure TfpgTrackBarExtra.SetTBPosition(const AValue: integer); begin if FPosition = AValue then Exit; //==> @@ -377,7 +377,7 @@ begin else FMax := AValue; if FPosition > FMax then - SetPosition(FMax); + SetTBPosition(FMax); end; procedure TfpgTrackBar.SetMin(const AValue: integer); @@ -389,10 +389,10 @@ begin else FMin := AValue; if FPosition < FMin then - SetPosition(FMin); + SetTBPosition(FMin); end; -procedure TfpgTrackBar.SetPosition(const AValue: integer); +procedure TfpgTrackBar.SetTBPosition(const AValue: integer); begin if AValue < FMin then FPosition := FMin |