Rogue Wave Views 5.6 |
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. | |
void | addFilter (const IlString &text, const IlString &ext) |
Adds a file filter. | |
void | enableMultiSelection (IlBoolean enable) |
Enables or disables the multi-selection mode. | |
virtual const IlString & | getBitmapName (IlvFileChooserBitmapName name) const |
Returns a bitmap file name for a dialog bitmap. | |
virtual IlInt | getButtonHeight () const |
Returns the height of the buttons at the bottom of the dialog. | |
virtual const IlString & | getButtonToolTip (IlvFileChooserToolTip name) const |
Returns a tooltip label used by the dialog. | |
virtual IlInt | getButtonWidth () const |
Returns the width of the buttons at the bottom of the dialog. | |
virtual IlvFileChooserDisplayMode | getDefaultDisplayMode () const |
Returns the default display mode. | |
virtual IlUShort | getDefaultFilter () const |
Returns the default filter index. | |
const IlString & | getDefaultFilterExtension () const |
Returns the default filter extension. | |
IlUShort | getFilterCount () const |
Returns filter count. | |
const IlString & | getFilterExtension (IlUShort index) const |
Returns a filter extension. | |
const IlString & | getFilterText (IlUShort index) const |
Returns a filter description. | |
virtual const char * | getLabel (IlvDisplay *disp, IlvFileChooserLabel name) const |
Returns a translated label used by the dialog. | |
virtual const IlString & | getLabel (IlvFileChooserLabel name) const |
Returns a label used by the dialog. | |
virtual IlInt | getLabelWidth () const |
Returns the width of the labels at the bottom of the dialog. | |
virtual IlInt | getOptionsButtonWidth () const |
Returns the width of the toolbar buttons. | |
IlvFileChooserSelection | getSelectionType () const |
Returns selection type. | |
virtual const IlString & | getTitle () const |
Returns the dialog title. | |
virtual IlInt | getToolBarHeight () const |
Returns the height of the dialog toolbar. | |
IlvFileChooserType | getType () const |
Returns dialog type. | |
virtual IlBoolean | isCompactSizeUsed () const |
Indicates the format of the file size column. | |
virtual IlBoolean | isCreateDirectoryButtonShown () const |
Indicates if the Create directory button is visible. | |
virtual IlBoolean | isFilterShown () const |
Indicates if the filter list must be shown. | |
virtual IlBoolean | isListModeButtonShown () const |
Indicates if the List mode button is visible. | |
virtual IlBoolean | isMatrixModeButtonShown () const |
Indicates if the Matrix mode button is visible. | |
virtual IlBoolean | isMultiSelectionEnabled () const |
Indicates if the multi-selection mode is enabled. | |
virtual IlBoolean | isShowAllButtonShown () const |
Indicates if the Show all files button is visible. | |
virtual IlBoolean | isShowAllByDefault () const |
Indicates whether all files and directories are visible by default. | |
virtual IlBoolean | isUpDirectoryButtonShown () const |
Indicates if the Up directory button is visible. | |
void | removeAllFilters () |
void | setBitmapName (IlvFileChooserBitmapName name, const IlString &filename) |
Sets a bitmap file name for a dialog bitmap. | |
void | setButtonHeight (IlInt height) |
Sets the height of the buttons at the bottom of the dialog. | |
void | setButtonToolTip (IlvFileChooserToolTip name, const IlString &tooltip) |
Sets a tooltip label used by the dialog. | |
void | setButtonWidth (IlInt width) |
Sets the width of the buttons at the bottom of the dialog. | |
void | setDefaultDisplayMode (IlvFileChooserDisplayMode mode) |
Sets the default display mode. | |
void | setDefaultFilter (IlUShort index) |
Sets the default filter index. | |
void | setLabel (IlvFileChooserLabel name, const IlString &label) |
Sets a label used by the dialog. | |
void | setLabelWidth (IlInt width) |
Sets the width of the labels at the bottom of the dialog. | |
void | setOptionsButtonWidth (IlInt width) |
Sets the width of the toolbar buttons. | |
void | setTitle (const IlString &title) |
Sets the dialog title. | |
void | setToolBarHeight (IlInt height) |
Sets the height of the dialog toolbar. | |
void | showAllByDefault (IlBoolean showAll) |
Shows or hides all files and directories by default. | |
void | showCreateDirectoryButton (IlBoolean show) |
Shows or hides the Create directory button. | |
void | showListModeButton (IlBoolean show) |
Shows or hides the List mode button. | |
void | showMatrixModeButton (IlBoolean show) |
Shows or hides the Matrix mode button. | |
void | showShowAllButton (IlBoolean show) |
Shows or hides the Show all files button. | |
void | showUpDirectoryButton (IlBoolean show) |
Shows or hides the Up directory button. | |
void | useCompactSize (IlBoolean compact) |
Specifies the format of the file size column. |
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 setTilte
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 const IlString& IlvFileChooserOptions::getBitmapName | ( | IlvFileChooserBitmapName | name | ) | const [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 IlInt IlvFileChooserOptions::getButtonHeight | ( | ) | const [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 const IlString& IlvFileChooserOptions::getButtonToolTip | ( | IlvFileChooserToolTip | name | ) | const [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 IlInt IlvFileChooserOptions::getButtonWidth | ( | ) | const [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 IlvFileChooserDisplayMode IlvFileChooserOptions::getDefaultDisplayMode | ( | ) | const [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 IlUShort IlvFileChooserOptions::getDefaultFilter | ( | ) | const [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 const char* IlvFileChooserOptions::getLabel | ( | IlvDisplay * | disp, | |
IlvFileChooserLabel | name | |||
) | const [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 const IlString& IlvFileChooserOptions::getLabel | ( | IlvFileChooserLabel | name | ) | const [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 IlInt IlvFileChooserOptions::getLabelWidth | ( | ) | const [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 IlInt IlvFileChooserOptions::getOptionsButtonWidth | ( | ) | const [virtual] |
Returns the width of the toolbar buttons.
23
. IlvFileChooserSelection IlvFileChooserOptions::getSelectionType | ( | ) | const |
Returns selection type.
IlvFileChooserFileSelection
. virtual const IlString& IlvFileChooserOptions::getTitle | ( | ) | const [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 IlInt IlvFileChooserOptions::getToolBarHeight | ( | ) | const [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 IlBoolean IlvFileChooserOptions::isCompactSizeUsed | ( | ) | const [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 IlBoolean IlvFileChooserOptions::isCreateDirectoryButtonShown | ( | ) | const [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 IlBoolean IlvFileChooserOptions::isFilterShown | ( | ) | const [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 IlBoolean IlvFileChooserOptions::isListModeButtonShown | ( | ) | const [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 IlBoolean IlvFileChooserOptions::isMatrixModeButtonShown | ( | ) | const [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 IlBoolean IlvFileChooserOptions::isMultiSelectionEnabled | ( | ) | const [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 IlBoolean IlvFileChooserOptions::isShowAllButtonShown | ( | ) | const [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 IlBoolean IlvFileChooserOptions::isShowAllByDefault | ( | ) | const [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 IlBoolean IlvFileChooserOptions::isUpDirectoryButtonShown | ( | ) | const [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 2012, 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.