Rogue Wave Views |
Rogue Wave Views Documentation Home |
File chooser options class. More...
#include <ilviews/gadgets/filechoo.h>
Public Member Functions | |
IlvFileChooserOptions (IlvFileChooserType typ=IlvFileChooserOpen, IlvFileChooserSelection sel=IlvFileChooserFileSelection) | |
Constructor. More... | |
void | addFilter (const IlString &text, const IlString &ext) |
Adds a file filter. More... | |
void | enableMultiSelection (IlBoolean enable) |
Enables or disables the multi-selection mode. More... | |
virtual const IlString & | getBitmapName (IlvFileChooserBitmapName name) const |
Returns a bitmap file name for a dialog bitmap. More... | |
virtual IlInt | getButtonHeight () const |
Returns the height of the buttons at the bottom of the dialog. More... | |
virtual const IlString & | getButtonToolTip (IlvFileChooserToolTip name) const |
Returns a tooltip label used by the dialog. More... | |
virtual IlInt | getButtonWidth () const |
Returns the width of the buttons at the bottom of the dialog. More... | |
virtual IlvFileChooserDisplayMode | getDefaultDisplayMode () const |
Returns the default display mode. More... | |
virtual IlUShort | getDefaultFilter () const |
Returns the default filter index. More... | |
const IlString & | getDefaultFilterExtension () const |
Returns the default filter extension. More... | |
IlUShort | getFilterCount () const |
Returns filter count. More... | |
const IlString & | getFilterExtension (IlUShort index) const |
Returns a filter extension. More... | |
const IlString & | getFilterText (IlUShort index) const |
Returns a filter description. More... | |
virtual const IlString & | getLabel (IlvFileChooserLabel name) const |
Returns a label used by the dialog. More... | |
virtual const char * | getLabel (IlvDisplay *display, IlvFileChooserLabel name) const |
Returns a translated label used by the dialog. More... | |
virtual IlInt | getLabelWidth () const |
Returns the width of the labels at the bottom of the dialog. More... | |
virtual IlInt | getOptionsButtonWidth () const |
Returns the width of the toolbar buttons. More... | |
IlvFileChooserSelection | getSelectionType () const |
Returns selection type. More... | |
virtual const IlString & | getTitle () const |
Returns the dialog title. More... | |
virtual IlInt | getToolBarHeight () const |
Returns the height of the dialog toolbar. More... | |
IlvFileChooserType | getType () const |
Returns dialog type. More... | |
virtual IlBoolean | isCompactSizeUsed () const |
Indicates the format of the file size column. More... | |
virtual IlBoolean | isCreateDirectoryButtonShown () const |
Indicates if the Create directory button is visible. More... | |
virtual IlBoolean | isFilterShown () const |
Indicates if the filter list must be shown. More... | |
virtual IlBoolean | isListModeButtonShown () const |
Indicates if the List mode button is visible. More... | |
virtual IlBoolean | isMatrixModeButtonShown () const |
Indicates if the Matrix mode button is visible. More... | |
virtual IlBoolean | isMultiSelectionEnabled () const |
Indicates if the multi-selection mode is enabled. More... | |
virtual IlBoolean | isShowAllButtonShown () const |
Indicates if the Show all files button is visible. More... | |
virtual IlBoolean | isShowAllByDefault () const |
Indicates whether all files and directories are visible by default. More... | |
virtual IlBoolean | isUpDirectoryButtonShown () const |
Indicates if the Up directory button is visible. More... | |
void | removeAllFilters () |
void | setBitmapName (IlvFileChooserBitmapName name, const IlString &filename) |
Sets a bitmap file name for a dialog bitmap. More... | |
void | setButtonHeight (IlInt height) |
Sets the height of the buttons at the bottom of the dialog. More... | |
void | setButtonToolTip (IlvFileChooserToolTip name, const IlString &tooltip) |
Sets a tooltip label used by the dialog. More... | |
void | setButtonWidth (IlInt width) |
Sets the width of the buttons at the bottom of the dialog. More... | |
void | setDefaultDisplayMode (IlvFileChooserDisplayMode mode) |
Sets the default display mode. More... | |
void | setDefaultFilter (IlUShort index) |
Sets the default filter index. More... | |
void | setLabel (IlvFileChooserLabel name, const IlString &label) |
Sets a label used by the dialog. More... | |
void | setLabelWidth (IlInt width) |
Sets the width of the labels at the bottom of the dialog. More... | |
void | setOptionsButtonWidth (IlInt width) |
Sets the width of the toolbar buttons. More... | |
void | setTitle (const IlString &title) |
Sets the dialog title. More... | |
void | setToolBarHeight (IlInt height) |
Sets the height of the dialog toolbar. More... | |
void | showAllByDefault (IlBoolean showAll) |
Shows or hides all files and directories by default. More... | |
void | showCreateDirectoryButton (IlBoolean show) |
Shows or hides the Create directory button. More... | |
void | showListModeButton (IlBoolean show) |
Shows or hides the List mode button. More... | |
void | showMatrixModeButton (IlBoolean show) |
Shows or hides the Matrix mode button. More... | |
void | showShowAllButton (IlBoolean show) |
Shows or hides the Show all files button. More... | |
void | showUpDirectoryButton (IlBoolean show) |
Shows or hides the Up directory button. More... | |
void | useCompactSize (IlBoolean compact) |
Specifies the format of the file size column. More... | |
File chooser options class.
Library: ilvadvgdt
This class is used to configure an IlvFileChooser
dialog object. This class can be used to modify the look and behaviour of the dialog. There are two ways to modify the dialog:
setXxxxx()
function such as the setTitle()
method. IlvFileChooser
. IlvFileChooserOptions::IlvFileChooserOptions | ( | IlvFileChooserType | typ = IlvFileChooserOpen , |
IlvFileChooserSelection | sel = IlvFileChooserFileSelection |
||
) |
Constructor.
Initializes a new instance of the IlvFileChooserOptions
class.
typ | The type of dialog. |
sel | The selection mode. |
Adds a file filter.
Adds a file filter. By default the dialog has no filter. A filter associates a description with an extension, for example, Ilv files and ilv
. You can indicate multiple extensions for one filter>. In this case the extensions must be separated by the |
character, for example, ilv|iva
. To define a filter which displays all files, use the character *
for the extension. Multiple extensions for one filter cannot be defined if one of these extensions is *
. For example, ilv|iva|*
is forbidden.
text | The filter description. |
ext | The filter extensions. |
void IlvFileChooserOptions::enableMultiSelection | ( | IlBoolean | enable | ) |
Enables or disables the multi-selection mode.
Enables or disables the multi-selection mode.
enable | If the value is IlTrue then the multi-selection mode is on. |
|
virtual |
Returns a bitmap file name for a dialog bitmap.
This method gets the file name of a bitmap in the file chooser dialog. The default value can be found in the IlvFileChooserBitmapName
documentation.
name | The bitmap name in the dialog. |
|
virtual |
Returns the height of the buttons at the bottom of the dialog.
Returns the height of buttons such as Apply or Cancel at the bottom of the dialog.
27
.
|
virtual |
Returns a tooltip label used by the dialog.
Returns a tooltip label used by the dialog. The default value can be found in the IlvFileChooserToolTip
documentation.
name | The name of the tooltip. |
|
virtual |
Returns the width of the buttons at the bottom of the dialog.
Returns the width of buttons such as Apply or Cancel at the bottom of the dialog.
80
.
|
virtual |
Returns the default display mode.
Returns the default display mode of the sheet which displays directories and files. The default value is IlvFileChooserListMode
.
|
virtual |
Returns the default filter index.
0
. const IlString& IlvFileChooserOptions::getDefaultFilterExtension | ( | ) | const |
Returns the default filter extension.
Returns the filter extension of the default filter. The index of the default filter is returned by the getDefaultFilter()
method.
IlUShort IlvFileChooserOptions::getFilterCount | ( | ) | const |
Returns filter count.
Returns a filter extension.
Returns a filter extension.
index | The filter index in the filter array. The index value must be valid starting from 0 . |
Returns a filter description.
Returns a filter description.
index | The filter index in the filter array. The index value must be valid starting from 0 . |
|
virtual |
Returns a label used by the dialog.
Returns a label used by the dialog. The default value of each label is defined in the documentation of the IlvFileChooserLabel
enumeration type.
name | The name of the label. |
|
virtual |
Returns a translated label used by the dialog.
Returns a translated label used by the dialog. The input label is used as a key from a dbm file. This method does not return the key but the translation associated with the key. The default value of each label is defined in the documentation of the IlvFileChooserLabel
enumeration type.
display | The connection to the display. |
name | The name of the label. |
|
virtual |
Returns the width of the labels at the bottom of the dialog.
Returns the width of labels such as Filename or Filter at the bottom of the dialog.
90
.
|
virtual |
Returns the width of the toolbar buttons.
23
. IlvFileChooserSelection IlvFileChooserOptions::getSelectionType | ( | ) | const |
Returns selection type.
IlvFileChooserFileSelection
.
|
virtual |
Returns the dialog title.
Returns the dialog title. The default value of the dialog type and selection type. This default value is a key from the views.dbm
file. The value can be &FCSelectDirectory
, &FCSaveAs
or &FCOpenFile
.
|
virtual |
Returns the height of the dialog toolbar.
Returns the height of the dialog toolbar which displays the path and certain buttons such as the display modes.
27
. IlvFileChooserType IlvFileChooserOptions::getType | ( | ) | const |
Returns dialog type.
IlvFileChooserOpen
.
|
virtual |
Indicates the format of the file size column.
In List mode, the sheet displays a file size column. The values in this column can be displayed in full mode (all digits) or compact mode (4 digits with a unit of size such as GB
).
IlTrue
if Compact mode is used to display the sizes. The default value is IlTrue
.
|
virtual |
Indicates if the Create directory button is visible.
Indicates if the Create directory button is visible.
IlTrue
if the button is visible. The default value is IlTrue
.
|
virtual |
Indicates if the filter list must be shown.
By default, this method returns IlFalse
if there is no filter or if no file can be selected.
IlTrue
if the filter list must be shown.
|
virtual |
Indicates if the List mode button is visible.
Indicates if the List mode button is visible.
IlTrue
if the button is visible. The default value is IlTrue
.
|
virtual |
Indicates if the Matrix mode button is visible.
Indicates if the Matrix mode button is visible.
IlTrue
if the button is visible. The default value is IlTrue
.
|
virtual |
Indicates if the multi-selection mode is enabled.
Indicates if the multi-selection mode is enabled.
IlTrue
if the multi-selection mode is enabled. The default value is IlFalse
.
|
virtual |
Indicates if the Show all files button is visible.
Indicates if the Show all files button is visible.
IlTrue
if the button is visible. The default value is IlTrue
.
|
virtual |
Indicates whether all files and directories are visible by default.
Indicates whether all files and directories are visible by default.
IlTrue
if all files and directories are visible. The default value is IlFalse
.
|
virtual |
Indicates if the Up directory button is visible.
Indicates if the Up directory button is visible.
IlTrue
if the button is visible. The default value is IlTrue
. void IlvFileChooserOptions::removeAllFilters | ( | ) |
Removes all defined filters.
void IlvFileChooserOptions::setBitmapName | ( | IlvFileChooserBitmapName | name, |
const IlString & | filename | ||
) |
Sets a bitmap file name for a dialog bitmap.
The file chooser dialog uses bitmaps which can be replaced using this method.
name | The bitmap name in the dialog. |
filename | The file name of the new bitmap. |
void IlvFileChooserOptions::setButtonHeight | ( | IlInt | height | ) |
Sets the height of the buttons at the bottom of the dialog.
Sets the height of buttons such as Apply or Cancel at the bottom of the dialog.
height | The height of the buttons. |
void IlvFileChooserOptions::setButtonToolTip | ( | IlvFileChooserToolTip | name, |
const IlString & | tooltip | ||
) |
Sets a tooltip label used by the dialog.
Sets a tooltip label used by the dialog.
name | The name of the tooltip. |
tooltip | The tooltip label. |
void IlvFileChooserOptions::setButtonWidth | ( | IlInt | width | ) |
Sets the width of the buttons at the bottom of the dialog.
Sets the width of buttons such as Apply or Cancel at the bottom of the dialog.
width | The width of the buttons. |
void IlvFileChooserOptions::setDefaultDisplayMode | ( | IlvFileChooserDisplayMode | mode | ) |
Sets the default display mode.
Sets the default display mode of the sheet which displays directories and files.
mode | The display mode. |
void IlvFileChooserOptions::setDefaultFilter | ( | IlUShort | index | ) |
Sets the default filter index.
Sets the default filter index. The index value is not checked.
index | The filter index. |
void IlvFileChooserOptions::setLabel | ( | IlvFileChooserLabel | name, |
const IlString & | label | ||
) |
Sets a label used by the dialog.
Sets a label used by the dialog.
name | The name of the label. |
label | The label. |
void IlvFileChooserOptions::setLabelWidth | ( | IlInt | width | ) |
Sets the width of the labels at the bottom of the dialog.
Sets the width of labels such as Filename or Filter at the bottom of the dialog.
width | The width of the labels. |
void IlvFileChooserOptions::setOptionsButtonWidth | ( | IlInt | width | ) |
Sets the width of the toolbar buttons.
Sets the width of the toolbar buttons.
width | The width of the buttons. |
void IlvFileChooserOptions::setTitle | ( | const IlString & | title | ) |
Sets the dialog title.
Sets the dialog title.
title | Dialog title. |
void IlvFileChooserOptions::setToolBarHeight | ( | IlInt | height | ) |
Sets the height of the dialog toolbar.
Sets the height of the dialog toolbar which displays the path and certain buttons such as the display modes.
height | The height of the toolbar. |
void IlvFileChooserOptions::showAllByDefault | ( | IlBoolean | showAll | ) |
Shows or hides all files and directories by default.
Shows or hides all files and directories by default. A hidden file has a name beginning with a point. This is also true for directories.
showAll | If the value is IlTrue then all files and directories are visible. |
void IlvFileChooserOptions::showCreateDirectoryButton | ( | IlBoolean | show | ) |
Shows or hides the Create directory button.
Shows or hides the Create directory button which is displayed in the toolbar.
show | If the value is IlTrue , the button is visible otherwise, the button is hidden. |
void IlvFileChooserOptions::showListModeButton | ( | IlBoolean | show | ) |
Shows or hides the List mode button.
Shows or hides the List mode button which is displayed in the toolbar.
show | If the value is IlTrue , the button is visible otherwise, the button is hidden. |
void IlvFileChooserOptions::showMatrixModeButton | ( | IlBoolean | show | ) |
Shows or hides the Matrix mode button.
Shows or hides the Matrix mode button which is displayed in the toolbar.
show | If the value is IlTrue , the button is visible otherwise, the button is hidden. |
void IlvFileChooserOptions::showShowAllButton | ( | IlBoolean | show | ) |
Shows or hides the Show all files button.
Shows or hides the Show all files button which is displayed in the toolbar.
show | If the value is IlTrue , the button is visible otherwise, the button is hidden. |
void IlvFileChooserOptions::showUpDirectoryButton | ( | IlBoolean | show | ) |
Shows or hides the Up directory button.
Shows or hides the Up directory button which is displayed in the toolbar.
show | If the value is IlTrue , the button is visible otherwise, the button is hidden. |
void IlvFileChooserOptions::useCompactSize | ( | IlBoolean | compact | ) |
Specifies the format of the file size column.
In List mode, the sheet displays a file size column. The values in this column can be displayed in full mode (all digits) or compact mode (4 digits with a unit of size such as GB
).
compact | If the value is IlTrue , Compact mode is used to display the sizes. |
© Copyright 2015, Rogue Wave Software, Inc. All Rights Reserved.
Rogue Wave is a registered trademark of Rogue Wave Software, Inc. in the United States and other countries. All other trademarks are the property of their respective owners.