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.40 date: 2021/08/25 15:27:47
user: cg
file: FontMenu.st directory: libwidg2
module: stx stc-classLibrary: libwidg2

Description:


FontMenu used by UIPainter

copyright

COPYRIGHT (c) 1995 by eXept Software AG 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:

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
(comment from inherited method)
to be redefined in subclasses

o  updateModel

help specs
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.7.0.0; WebServer 1.702 at 20f6060372b9.unknown:8081; Mon, 18 Nov 2024 04:34:43 GMT