|
Class: FilenameWidgetWithHistory
Object
|
+--GraphicsMedium
|
+--DisplaySurface
|
+--SimpleView
|
+--FilenameWidgetWithHistory
|
+--FilenameWidgetWithoutHistory
- Package:
- stx:libwidg2
- Category:
- Views-Interactors
- Version:
- rev:
1.34
date: 2021/01/20 15:35:53
- user: cg
- file: FilenameWidgetWithHistory.st directory: libwidg2
- module: stx stc-classLibrary: libwidg2
A Filename InputField with history-list and a browse-button, which opens a file dialog.
copyrightCOPYRIGHT (c) 2007 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.
accessing
-
baseDirectory
-
-
baseDirectory: something
-
-
contents
-
-
dialogTitle: something
-
set the dialog's title
-
directoriesOnly: aBoolean
-
if true, directories are selectable only.
If both filesOnly and directoriesOnly are false, which is the default,
anything is selectable.
-
fileNameTranslationHook
-
-
fileNameTranslationHook: aBlock
-
an optional hook which gets the filename from the editField
and produces a full path for the file dialog (in the ...-button).
Use this, if the filename contains $(xxx) variables to be expanded
-
filesOnly: aBoolean
-
if true, files are selectable only.
If both filesOnly and directoriesOnly are false, which is the default,
anything is selectable.
-
historyList
-
-
historyList: aCollection
-
set the history - useful when two or more such fields shall share a common history
-
initialDirectoryHolder
-
can be used to force the file-dialog into some initial directory
-
model
-
(comment from inherited method)
return nil - simpleViews have no model (only providing geometric)
-
model: aFilenameHolder
-
-
selectAllInitially
-
accessing-channels
-
acceptChannel: aValueHolder
-
-
backgroundChannel
-
-
backgroundChannel: aValueHolder
-
-
enableChannel: aValueHolder
-
-
foregroundChannel
-
-
foregroundChannel: aValueHolder
-
-
modifiedChannel: aValueHolder
-
accessing-editField attributes
-
acceptIfUnchanged: aBoolean
-
-
acceptOnExpand: aBoolean
-
set/clear autoAccept on filename expansion (pressing tab key).
The default is true, which means that an expand accepts
-
acceptOnLeave: aBoolean
-
-
acceptOnLostFocus: aBoolean
-
-
acceptOnPointerLeave: aBoolean
-
-
acceptOnReturn: aBoolean
-
-
acceptOnTab: aBoolean
-
-
contents: aString
-
-
immediateAccept: aBoolean
-
-
maxChars: aBoolean
-
-
readOnly: aBoolean
-
(comment from inherited method)
ignored here; present for compatibility with some textView subclasses,
so that UIPainter can handle it in its TextView spec (which contains a
readOnly field)
initialization
-
initialize
-
(comment from inherited method)
initialize all state of the view - usually redefined in subclasses,
but always doing a 'super initialize'. Each class should setup its
locals - and not forget the others.
View setup is separated into two parts, the general setup done here
and the style specific setup in initStyle. Each view should be prepared
for a stylechange by being sent another initStyle with a new style value.
(in this case, it should set all of its style-dependent things, but
leave the state and contents as-is)
-
initializeBrowseButton
-
-
initializeFilenameField
-
queries
-
computePreferredExtent
-
max: browseButton preferredExtent y
user actions
-
browseForDestinationDirectory
-
** This is an obsolete interface - do not use it (it may vanish in future versions) **
-
browseForFileOrDirectory
-
lastDirectoryHolder value:path directory.
|top b|
top := StandardSystemView new.
top extent:(300 @ 200).
b := FilenameWidgetWithHistory in:top.
b origin:(0.0 @ 0.0) corner:(1.0 @ 0.0).
b bottomInset:(b preferredExtent y negated).
top open.
|
|