|
Class: ViewStyle
Object
|
+--Collection
|
+--Set
|
+--Dictionary
|
+--ResourcePack
|
+--ViewStyle
|
+--UISettings
- Package:
- stx:libview
- Category:
- Views-Support
- Version:
- rev:
1.46
date: 2024/03/21 15:00:55
- user: matilk
- file: ViewStyle.st directory: libview
- module: stx stc-classLibrary: libview
instances of this class keep all view-style specific information.
The current viewStyle is kept in Views-classvariable called 'StyleSheet'
and is instantiated with 'View defaultStyle:aStyleSymbol', which reads
a stylesheet from a file '<aStyleSymbol>.style' (usually in the 'resources'
directory.
copyrightCOPYRIGHT (c) 1993 by Claus Gittinger
All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
inclusion of the above copyright notice. This software may not
be provided or otherwise made available to, or used by, any
other person. No title to or ownership of the software is
hereby transferred.
constants
-
adwaita
-
-
macosx_yosemite
-
-
msWindows10
-
-
msWindows8
-
-
msWindowsVista
-
-
msWindowsXP
-
-
normal
-
instance creation
-
fromFile: aFileNameArg
-
get the preferences definitions from a file
Usage example(s):
ViewStyle fromFile:'motif'
ViewStyle fromFile:'motif.style'
ViewStyle fromFile:'normal.style'
ViewStyle fromFile:'iris.style'
ViewStyle fromFile:'iris.style' asFilename
|
accessing
-
at: aKey
-
(comment from inherited method)
translate a string
-
at: aKey default: default
-
translate a string; if not present, return default.
Here, two keys are tried, iff the key is of the form 'foo.bar',
'fooBar' is also tried.
This has been added for a smooth migration towards names with a form of
'classname.itemKey' in the stylesheets.
-
colorAt: aKey
-
retrieve a color resource - also acquire a device color
to avoid repeated color allocations later
-
colorAt: aKey default: default
-
retrieve a color resource - also acquire a device color
to avoid repeated color allocations later
-
deviceResourceAt: aKey default: default
-
retrieve a resource - also acquire a device version
for the default display, to avoid repeated allocations later
-
doesNotUnderstand: aMessage
-
(comment from inherited method)
this message is sent by the runtime system (VM) when
a message is not understood by some object (i.e. there
is no method for that selector). The original message has
been packed into aMessage (i.e. the receiver, selector and
any arguments) and the original receiver is then sent the
#doesNotUnderstand: message.
Here, we raise another signal which usually enters the debugger.
You can of course redefine #doesNotUnderstand: in your classes
to implement message delegation,
or handle the MessageNotUnderstood exception gracefully.
-
fontAt: aKey
-
retrieve a font resource - also acquire a device font
to avoid repeated font allocations later
-
fontAt: aKey default: default
-
retrieve a font resource - also acquire a device font
to avoid repeated font allocations later
-
is3D
-
-
name
-
-
viewGray
-
-
viewGrey
-
marked as obsolete by exept MBP at 20-09-2021
** This is an obsolete interface - do not use it (it may vanish in future versions) **
accessing-internals
-
superPack: anotherResourcePack
-
error handling
-
nonexistingFileRead
-
here, a non-existing stylesheet is treated as an error
queries
-
isWindowsStyle
-
answer true if this is a MS-Windows style.
XXX Currently we simply check the name
-
isWindowsVistaStyle
-
Modified (format): / 19-11-2016 / 15:49:48 / cg
-
isWindowsXPStyle
-
answer true if this is a MS-Windows-XP (or later) style.
XXX Currently we simply check the name
special
-
newDerivedStyle
-
create and return a new style, which inherits from
the receiver, but possibly overrides individual entries.
This may be useful to give a single button some different
look (in the future - read the comment in SimpleView>>viewStyle:)
Usage example(s):
|panel b1 b2 newStyle|
panel := HorizontalPanelView new.
panel add:(b1 := Button label:'oldStyle').
panel add:(b2 := Button label:'newStyle').
newStyle := b1 styleSheet newDerivedStyle.
newStyle at:'button.activeBackgroundColor' put:Color blue.
b2 styleSheet:newStyle.
panel open
|
|