eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'FontMenu':

Home

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

Class: FontMenu


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--View
               |
               +--MenuPanel
                  |
                  +--FontMenu

Package:
stx:libwidg2
Category:
Interface-UIPainter
Version:
rev: 1.36 date: 2018/11/09 23:39:13
user: cg
file: FontMenu.st directory: libwidg2
module: stx stc-classLibrary: libwidg2
Author:
Claus Atzkern

Description:


FontMenu used by UIPainter


Related information:

    UIPainter
    FontMenuSpec

Class protocol:

help specs
o  helpSpec
This resource specification was automatically generated
by the UIHelpTool of ST/X.

menu specs
o  menu
This resource specification was automatically generated
by the MenuEditor of ST/X.

usage example(s):

     MenuEditor new openOnClass:FontMenu andSelector:#menu
     (Menu new fromLiteralArrayEncoding:(FontMenu menu)) startUp


Instance protocol:

accessing
o  allowSymbolicFonts

o  allowSymbolicFonts: aBoolean

o  fontDescription
get the current font description

o  fontDescription: aFontDesc
set the font description

o  fontIsSymbolic

o  fontIsSymbolic: aBoolean

o  fontSymbol

o  fontSymbol: aSymbolOrMenuItem

o  labelsAreEmphasized

o  labelsAreEmphasized: aBoolean

accessing-channels
o  allowSymbolicFontsAndEnabledHolder

o  allowSymbolicFontsAndFontIsSymbolicHolder

o  allowSymbolicFontsHolder

o  enabledAndFontIsNotSymbolicHolder

o  enabledChannel

o  enabledChannel: aValueHolder

o  fontIsNotSymbolicHolder

o  fontIsSymbolicHolder

o  model: aValueHolder
set my model

aspects
o  fontAspectAt: key put: value

o  fontEncoding

o  fontEncoding: anEncodingSymbol

o  fontFace

o  fontFace: aFace

o  fontFamily

o  fontFamily: aFamily

o  fontSize

o  fontSize: aSize

o  fontStyle

o  fontStyle: aStyle

change & update
o  updateFromModel

o  updateModel

help
o  helpSpec
This resource specification was automatically generated
by the UIHelpTool of ST/X.

initialization
o  destroy
release dependencies

o  initialize
setup menu

menu spec
o  symbolicFontsMenu

user actions
o  launchFontEncodingDialog
launch dialog to get a font encoding

o  launchFontFaceDialog
launch dialog to get a font face

o  launchFontFamilyDialog
launch dialog to get a font family

o  launchFontSizeDialog
launch dialog to get a font size

o  launchFontStyleDialog
launch dialog to get a font style

o  launchFontSymbolDialog
launch dialog to get a font symbol

o  openFontChooser


Examples:


simple example
|top menu model|

model := #labelFont asValue.

top := StandardSystemView new.
top extent:250@200.
menu  := FontMenu origin:0.0@0.4 extent:1.0@30 in:top.
menu allowSymbolicFonts:true.
menu fontIsSymbolic:true.
menu model:model.
top open.
top waitUntilVisible.

[ |new old|

  old := model value.
  [ top shown] whileTrue:[
    new := model value.
    new ~= old ifTrue:[
        old := new.
        old notNil ifTrue:[ Transcript showCR:(old userFriendlyName) ]
                  ifFalse:[ Transcript showCR:'---------' ]
    ].
    Delay waitForSeconds:0.2.
  ]

] forkAt:8.


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Thu, 28 Mar 2024 15:40:19 GMT