On Fri, 28 Oct 2005 07:57:58 -0200
Felipe Monteiro de Carvalho <[EMAIL PROTECTED]> wrote:
> Mattias Gaertner wrote:
> >>1 - Include on the executable only the default glyphing set it will use.
> >
> >> The programmer can choose the widget set using a compiler directive
> >>perhaps, as I see no other way to only include the correct glyphs. This
> >>options imagines that the programmer will not want to change the
> >>glyphset durring run-time.
> > 3 -
> > Include one default icon set.
> > When the widgetset provides an icon for a button, take this
> > automatically. User can override with own icons.
> > Maybe: Add an IFDEF to not include the default iconset to create very
> > small applications.
>
> ok 3 and 1 are somehow similar. 3 has a problem it does not allow the
> programmer to choose easely between icon sets.
Sorry. I meant programmers, as 'users' of the LCL.
> Perhaps there is a default glyphing set, the widget may also have icons
> (or not). The programmer can choose what icons to be included using some
> compiler directives, like:
>
> DefaultGlyphsNone --> Does not include any glyphs (the programmer
> can include his own or not)
> DefaultGlyphsPlatform --> Includes the default glyphs or the ones for
> the platform, if they exist
> DefaultGlyphsMacOS --> Include the MacOS set
> DefaultGlyphsWindows --> Include Windows set
?
I'm not sure, what you mean by 'include' DefaultGlyphsWindows (...MacOS...).
> ....
>
> It may be interesting to see if the programmer can override only 1 or 2
> glyphs instead of all of them.
Overriding 'all' of them is difficult and most of the time unwanted.
Normally you want to override only those buttons, that you use and/or you
have nicer buttons for.
I was thinking of something like this:
type
TGetDefaultBitBtnGlyph = function(Kind: TBitBtnKind): TBitmap;
TGetDefaultMsgDlgBtnGlyph = function(Btn: TMsgDlgBtn): TBitmap;
var
GetDefaultBitBtnGlyph: TGetDefaultBitBtnGlyph = nil;
GetDefaultMsgDlgBtnGlyph: TGetDefaultMsgDlgBtnGlyph = nil;
The programmer can override them with functions like this:
function GetDefaultBitBtnGlyph(Kind: TBitBtnKind): TBitmap;
begin
if Kind in [bkOK, bkCancel] then begin
Result:=TBitmap.Create;
case Kind of
bkOk: Result.Assign(MyOkGlyph);
bkCancel: Result.Assign(MyCancelGlyph);
end;
end else
Result:=nil;
end;
We can create a TImageList descendent, say TBitBtnGlyphs, that can be used
in the designer.
> How wanted is the feature of allowing the programmer to choose the glyph
> set from one of the default sets???
There are only 2 default sets:
- The LCL built in set
- The current platform set
I guess, the last is almost always preferred above the first, so we don't
need a choice.
The LCL 'built in' is needed as fallback, when the platform misses a glyph.
> Using 3 instead of 1 simplyfies if we ignore this feature.
Mattias
_________________________________________________________________
To unsubscribe: mail [EMAIL PROTECTED] with
"unsubscribe" as the Subject
archives at http://www.lazarus.freepascal.org/mailarchives