On Sat, 29 Oct 2005 17:34:29 +0200 Mattias Gaertner <[EMAIL PROTECTED]> wrote:
> On Sat, 29 Oct 2005 13:20:02 -0200 > Felipe Monteiro de Carvalho <[EMAIL PROTECTED]> wrote: > > > Mattias Gaertner wrote: > > >>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...). > > > > I meant something like this: > > > > {$IFDEF DefaultGlyphsPlatform} > > {$I defaultglyphs.inc} > > {$ELSEIF DefaultGlyphsMacOS} > > {$I macosglyphs.inc} > > ...... > > {$ENDIF} > > Do you mean, you want MacOSX icons under non macosx? > > > > > 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; > > > > > > We can create a TImageList descendent, say TBitBtnGlyphs, that can be > > > used in the designer. > > > > Sounds very interesting > > > > > 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. > > > > Ok, so no need to allow the programmer to choose from different sets. If > > > > he wants he can create a function to override the glyphs. > > > > And what about noglyphs?? How this can be implemented? > > GetDefaultBitBtnGlyph would return nil? A fully transparent bitmap? > > If it returns nil, the default glyph is used. Means: > First the widgetset will be asked, and if it also returns nil, the LCL > built-in will be used. > To get no glyph, return a bitmap with Width=0. I added GetDefaultBitBtnGlyph to lcl/buttons.pp. Mattias _________________________________________________________________ To unsubscribe: mail [EMAIL PROTECTED] with "unsubscribe" as the Subject archives at http://www.lazarus.freepascal.org/mailarchives