eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'ViewStyle':

Home

Documentation
www.exept.de
Everywhere
for:
[back]

Class: ViewStyle


Inheritance:

   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

Description:


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.

copyright

COPYRIGHT (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.

Class protocol:

constants
o  adwaita

o  macosx_yosemite

o  msWindows10

o  msWindows8

o  msWindowsVista

o  msWindowsXP

o  normal

instance creation
o  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


Instance protocol:

accessing
o  at: aKey
(comment from inherited method)
translate a string

o  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.

o  colorAt: aKey
retrieve a color resource - also acquire a device color
to avoid repeated color allocations later

o  colorAt: aKey default: default
retrieve a color resource - also acquire a device color
to avoid repeated color allocations later

o  deviceResourceAt: aKey default: default
retrieve a resource - also acquire a device version
for the default display, to avoid repeated allocations later

o  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.

o  fontAt: aKey
retrieve a font resource - also acquire a device font
to avoid repeated font allocations later

o  fontAt: aKey default: default
retrieve a font resource - also acquire a device font
to avoid repeated font allocations later

o  is3D

o  name

o  viewGray

o  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
o  superPack: anotherResourcePack

error handling
o  nonexistingFileRead
here, a non-existing stylesheet is treated as an error

queries
o  isWindowsStyle
answer true if this is a MS-Windows style.
XXX Currently we simply check the name

o  isWindowsVistaStyle
Modified (format): / 19-11-2016 / 15:49:48 / cg

o  isWindowsXPStyle
answer true if this is a MS-Windows-XP (or later) style.
XXX Currently we simply check the name

special
o  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



ST/X 7.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Sat, 21 Dec 2024 18:23:04 GMT