From f742b03ed3afc5b55df65a6bb8a3e2984479ac4b Mon Sep 17 00:00:00 2001 From: graemeg Date: Thu, 3 Jul 2008 13:33:37 +0000 Subject: * EditTest in the prototypes directory now tests Button ImageLayout property. * TfpgBevel has been added to the UI Designer component palette. * TfpgBevel is used in the UI Designer and Shape=Spacer it paints itself different in the UI Designer, so it's more visible. At runtime it doesn't paint like that. --- examples/apps/uidesigner/icons.inc | 105 +++++++++++++++++++++++++++ examples/apps/uidesigner/newformdesigner.pas | 6 +- examples/apps/uidesigner/uidesigner.lpi | 10 ++- examples/apps/uidesigner/vfdwidgets.pas | 16 ++++ 4 files changed, 133 insertions(+), 4 deletions(-) (limited to 'examples') diff --git a/examples/apps/uidesigner/icons.inc b/examples/apps/uidesigner/icons.inc index cc4f2d98..71d8542b 100644 --- a/examples/apps/uidesigner/icons.inc +++ b/examples/apps/uidesigner/icons.inc @@ -1979,3 +1979,108 @@ Const 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, 255,255, 0,255,255, 0,255, 0, 0, 0); + +Const + stdimg_vfd_bevel : Array[0..1709] of byte = ( + 66, 77,174, 6, 0, 0, 0, 0, 0, 0, 54, 0, 0, 0, 40, 0, 0, + 0, 23, 0, 0, 0, 23, 0, 0, 0, 1, 0, 24, 0, 0, 0, 0, 0, + 120, 6, 0, 0, 19, 11, 0, 0, 19, 11, 0, 0, 0, 0, 0, 0, 0, + 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, + 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, + 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255, 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, + 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, + 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, + 0,255,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,200,208,212, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255, 0,255,255, 0,255, 0, 0, 0,255, 0, + 255,128,128,128,200,208,212,128,128,128,128,128,128,128,128,128,128, + 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, + 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, + 128,128,128,128,128,128,128,255,255,255,255, 0,255,255, 0,255, 0, + 0, 0,255, 0,255,128,128,128,255,255,255,200,208,212,200,208,212, + 200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208, + 212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200, + 208,212,200,208,212,200,208,212,128,128,128,255,255,255,255, 0,255, + 255, 0,255, 0, 0, 0,255, 0,255,128,128,128,255,255,255,200,208, + 212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200, + 208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212, + 200,208,212,200,208,212,200,208,212,200,208,212,128,128,128,255,255, + 255,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,128,128,128,255, + 255,255,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212, + 200,208,212,200,208,212,128,128,128,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,200,208,212,128, + 128,128,255,255,255,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255, + 128,128,128,255,255,255,200,208,212,200,208,212,200,208,212,200,208, + 212,200,208,212,200,208,212,200,208,212,128,128,128,200,208,212,200, + 208,212,200,208,212,200,208,212,200,208,212,200,208,212,255,255,255, + 200,208,212,128,128,128,255,255,255,255, 0,255,255, 0,255, 0, 0, + 0,255, 0,255,128,128,128,255,255,255,200,208,212,200,208,212,200, + 208,212,200,208,212,200,208,212,200,208,212,200,208,212,128,128,128, + 200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208, + 212,255,255,255,200,208,212,128,128,128,255,255,255,255, 0,255,255, + 0,255, 0, 0, 0,255, 0,255,128,128,128,255,255,255,200,208,212, + 200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208, + 212,128,128,128,200,208,212,200,208,212,200,208,212,200,208,212,200, + 208,212,200,208,212,255,255,255,200,208,212,128,128,128,255,255,255, + 255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,128,128,128,255,255, + 255,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200, + 208,212,200,208,212,128,128,128,128,128,128,128,128,128,128,128,128, + 128,128,128,128,128,128,128,128,128,255,255,255,200,208,212,128,128, + 128,255,255,255,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,128, + 128,128,255,255,255,200,208,212,200,208,212,200,208,212,200,208,212, + 200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208, + 212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200, + 208,212,128,128,128,255,255,255,255, 0,255,255, 0,255, 0, 0, 0, + 255, 0,255,128,128,128,255,255,255,200,208,212,200,208,212,200,208, + 212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200, + 208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212, + 200,208,212,200,208,212,128,128,128,255,255,255,255, 0,255,255, 0, + 255, 0, 0, 0,255, 0,255,128,128,128,255,255,255,200,208,212,255, + 255,255,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, + 128,128,128,200,208,212,200,208,212,200,208,212,200,208,212,200,208, + 212,200,208,212,200,208,212,200,208,212,128,128,128,255,255,255,255, + 0,255,255, 0,255, 0, 0, 0,255, 0,255,128,128,128,255,255,255, + 200,208,212,255,255,255,200,208,212,200,208,212,200,208,212,200,208, + 212,200,208,212,128,128,128,200,208,212,200,208,212,200,208,212,200, + 208,212,200,208,212,200,208,212,200,208,212,200,208,212,128,128,128, + 255,255,255,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,128,128, + 128,255,255,255,200,208,212,255,255,255,200,208,212,200,208,212,200, + 208,212,200,208,212,200,208,212,128,128,128,200,208,212,200,208,212, + 200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208, + 212,128,128,128,255,255,255,255, 0,255,255, 0,255, 0, 0, 0,255, + 0,255,128,128,128,255,255,255,200,208,212,255,255,255,200,208,212, + 200,208,212,200,208,212,200,208,212,200,208,212,128,128,128,200,208, + 212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200, + 208,212,200,208,212,128,128,128,255,255,255,255, 0,255,255, 0,255, + 0, 0, 0,255, 0,255,128,128,128,255,255,255,200,208,212,255,255, + 255,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,128, + 128,128,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212, + 200,208,212,200,208,212,200,208,212,128,128,128,255,255,255,255, 0, + 255,255, 0,255, 0, 0, 0,255, 0,255,128,128,128,255,255,255,200, + 208,212,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,128,128,128,200,208,212,200,208,212,200,208,212,200,208, + 212,200,208,212,200,208,212,200,208,212,200,208,212,128,128,128,255, + 255,255,255, 0,255,255, 0,255, 0, 0, 0,255, 0,255,128,128,128, + 255,255,255,200,208,212,200,208,212,200,208,212,200,208,212,200,208, + 212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212,200, + 208,212,200,208,212,200,208,212,200,208,212,200,208,212,200,208,212, + 128,128,128,255,255,255,255, 0,255,255, 0,255, 0, 0, 0,255, 0, + 255,128,128,128,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255,255, + 255,255,255,255,200,208,212,255,255,255,255, 0,255,255, 0,255, 0, + 0, 0,255, 0,255,128,128,128,128,128,128,128,128,128,128,128,128, + 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, + 128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128,128, + 128,128,128,128,128,128,128,128,128,128,128,200,208,212,255, 0,255, + 255, 0,255, 0, 0, 0,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, + 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255, + 255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0,255,255, 0, + 255,255, 0,255,255, 0,255, 0, 0, 0); + diff --git a/examples/apps/uidesigner/newformdesigner.pas b/examples/apps/uidesigner/newformdesigner.pas index 5fb1701a..0f6af0f8 100644 --- a/examples/apps/uidesigner/newformdesigner.pas +++ b/examples/apps/uidesigner/newformdesigner.pas @@ -276,7 +276,7 @@ var begin {@VFD_BODY_BEGIN: frmMain} Name := 'frmMain'; - SetPosition(84, 123, 695, 87); + SetPosition(84, 123, 728, 87); WindowTitle := 'frmMain'; WindowPosition := wpUser; gINI.ReadFormState(self); @@ -285,7 +285,7 @@ begin with MainMenu do begin Name := 'MainMenu'; - SetPosition(0, 0, 696, 24); + SetPosition(0, 0, 729, 24); Anchors := [anLeft,anRight,anTop]; end; @@ -332,7 +332,7 @@ begin with wgpalette do begin Name := 'wgpalette'; - SetPosition(116, 28, 580, 28); + SetPosition(116, 28, 613, 28); Anchors := [anLeft,anRight,anTop]; Focusable := False; end; diff --git a/examples/apps/uidesigner/uidesigner.lpi b/examples/apps/uidesigner/uidesigner.lpi index 683e219a..0d892a09 100644 --- a/examples/apps/uidesigner/uidesigner.lpi +++ b/examples/apps/uidesigner/uidesigner.lpi @@ -33,7 +33,7 @@ - + @@ -104,6 +104,14 @@ + + + + + + + + diff --git a/examples/apps/uidesigner/vfdwidgets.pas b/examples/apps/uidesigner/vfdwidgets.pas index d47f0d88..fb41337f 100644 --- a/examples/apps/uidesigner/vfdwidgets.pas +++ b/examples/apps/uidesigner/vfdwidgets.pas @@ -200,6 +200,12 @@ begin 'vfd.combodateedit', @stdimg_vfd_dateedit, sizeof(stdimg_vfd_dateedit), 0, 0); + + fpgImages.AddMaskedBMP( + 'vfd.bevel', @stdimg_vfd_bevel, + sizeof(stdimg_vfd_bevel), + 0, 0); + end; procedure AddWidgetPosProps(wgc: TVFDWidgetClass); @@ -334,6 +340,16 @@ begin wc.WidgetIconName := 'vfd.stringgrid'; RegisterVFDWidget(wc); + // Bevel + wc := TVFDWidgetClass.Create(TfpgBevel); + wc.NameBase := 'bvlName'; + wc.AddProperty('BorderStyle', TPropertyEnum, 'Single or Double'); + wc.AddProperty('Style', TPropertyEnum, 'Raised or Lower look'); + wc.AddProperty('Shape', TPropertyEnum, 'Box, Frame, TopLine, Spacer etc..'); + wc.WidgetIconName := 'vfd.bevel'; + wc.Container := True; + RegisterVFDWidget(wc); + // Panel wc := TVFDWidgetClass.Create(TfpgPanel); wc.NameBase := 'pnlName'; -- cgit v1.2.3-70-g09d2