eXept Software AG Logo

Smalltalk/X Webserver

Documentation of class 'TabSpecRuler':

Home

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

Class: TabSpecRuler


Inheritance:

   Object
   |
   +--GraphicsMedium
      |
      +--DisplaySurface
         |
         +--SimpleView
            |
            +--TabSpecRuler

Package:
stx:libwidg2
Category:
Views-Misc
Version:
rev: 1.23 date: 2016/07/20 09:36:30
user: stefan
file: TabSpecRuler.st directory: libwidg2
module: stx stc-classLibrary: libwidg2

Description:


It shows the tabulator positions of a TabulatorSpecification
and allows its tab positions to be manipulated.
(as shown in a FileBrowser, when the longList is enabled).

[author]
    Claus Gittinger


Related information:

    TabulatorSpecification
    Ruler
    ListView

Class protocol:

defaults
o  updateStyleCache
(comment from inherited method)
this method gets some heavily used style stuff and keeps
it in class-variables for faster access.
Subclasses should redefine this to load any cached style-values
into faster class variables as well. These should NOT do a
super updateStyleCache, since this method is called for all view-classes
anyway.


Instance protocol:

accessing
o  beAsynchronous
clear synchronousOperation mode;
if on, a move is immediately forwarded to dependents;
of off, its forwarded when the mouse button is released.

o  beSynchronous
set synchronousOperation mode;
if on, a move is immediately forwarded to dependents;
of off, its forwarded when the mouse button is released.

o  fixedTabs
return the collection of tabIndices which are fixed;
or nil, if all are variable

o  fixedTabs: something
set the collection of tabIndices which are fixed;
nil, if all are to be variable

o  hiddenTabs
return the collection of tabs which are to be hidden
(or nil if all are to be shown)

o  hiddenTabs: something
set the collection of tabs which are to be hidden
(or nil if all are to be shown)

o  isSynchronous
return the synchronousOperation mode settings value

o  masterView: aView
set my master view - if non-nil, I will follow the masters scroll-offset

o  synchronousOperation
return the synchronousOperation mode settings value

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  synchronousOperation: something
set/clear synchronousOperation mode;
if on, a move is immediately forwarded to dependents;
of off, its forwarded when the mouse button is released.

** This is an obsolete interface - do not use it (it may vanish in future versions) **

o  tabsAreVariable
return the value of the instance variable 'tabsAreVariable' (automatically generated)

o  tabsAreVariable: something
set/clear movability of tabs. If false, tab positions are only
displayed - but cannot be moved by the user.
The default is true.

o  tabulatorSpecification: aTabSpec
set my tabulator specification

o  titles: aCollectionOfStrings

event handling
o  buttonMotion: state x: x y: y
mouse-button was moved while pressed;
redraw thumb at its new position and, if scroll-mode is asynchronous,
the scroll action is performed

o  buttonPress: button x: x y: y
mouse-button was pressed;
start moving the tab

o  buttonRelease: button x: x y: y
mouse-button was pressed;
start moving the tab

o  pointerLeave: state
mouse left view - restore cursor.

o  update: something with: aParameter from: changedObject

initialization
o  initStyle
(comment from inherited method)
this method sets up all style dependent things

o  initialize
TabSpecRuler new open

private
o  canMoveTabAtX: x

o  indexOfTabAtX: x

o  moveTabAtIndex: idx toX: movedTabX

queries
o  widthOfContents

redrawing
o  drawHandleAtX: x type: handleType
redraw a tabulator handle

o  positionOfTabAtIndex: idx

o  redraw
redraw the handles from by tabSpec

o  redrawTabAtIndex: idx
redraw a single handle

o  redrawTitleAtIndex: idx
redraw a single handle


Examples:


    |top head spec|

    top := View new.
    top extent:300@100.

    head := TabSpecRuler in:top.
    head width:1.0.
    head level:1.

    spec := TabulatorSpecification new.
    spec unit:#inch.
    spec positions:#(0     1     2.5    3.5    4       5        ).
    spec align:    #(#left #left #right #right #center #decimal ).

    head tabulatorSpecification:spec.
    top open.
    |top head spec|

    top := View new.
    top extent:300@100.

    head := TabSpecRuler in:top.
    head width:1.0.
    head level:1.
    head titles:#('col1' 'col2' 'col3' 'col4' 'col5' 'col6').

    spec := TabulatorSpecification new.
    spec unit:#inch.
    spec positions:#(0     1     2.5    3.5    4       5        ).
    spec align:    #(#left #left #right #right #center #decimal ).

    head tabulatorSpecification:spec.
    top open.


ST/X 7.2.0.0; WebServer 1.670 at bd0aa1f87cdd.unknown:8081; Fri, 29 Mar 2024 02:22:36 GMT