rwlogo

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
List of all members | Public Member Functions
IlvFileChooserOptions Class Reference

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 IlStringgetBitmapName (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 IlStringgetButtonToolTip (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 IlStringgetDefaultFilterExtension () const
 Returns the default filter extension. More...
 
IlUShort getFilterCount () const
 Returns filter count. More...
 
const IlStringgetFilterExtension (IlUShort index) const
 Returns a filter extension. More...
 
const IlStringgetFilterText (IlUShort index) const
 Returns a filter description. More...
 
virtual const IlStringgetLabel (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 IlStringgetTitle () 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...
 

Detailed Description

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:

See Also
IlvFileChooser.

Constructor & Destructor Documentation

IlvFileChooserOptions::IlvFileChooserOptions ( IlvFileChooserType  typ = IlvFileChooserOpen,
IlvFileChooserSelection  sel = IlvFileChooserFileSelection 
)

Constructor.

Initializes a new instance of the IlvFileChooserOptions class.

Parameters
typThe type of dialog.
selThe selection mode.

Member Function Documentation

void IlvFileChooserOptions::addFilter ( const IlString text,
const IlString ext 
)

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.

Parameters
textThe filter description.
extThe filter extensions.
void IlvFileChooserOptions::enableMultiSelection ( IlBoolean  enable)

Enables or disables the multi-selection mode.

Enables or disables the multi-selection mode.

Parameters
enableIf 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.

Parameters
nameThe bitmap name in the dialog.
Returns
The file name of the bitmap.
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.

Returns
The height of the buttons. The default height is 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.

Parameters
nameThe name of the tooltip.
Returns
The tooltip label.
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.

Returns
The width of the buttons. The default width is 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.

Returns
The display mode.
virtual IlUShort IlvFileChooserOptions::getDefaultFilter ( ) const
virtual

Returns the default filter index.

Returns
The default filter index. The default value is 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.

Returns
The filter extension.
IlUShort IlvFileChooserOptions::getFilterCount ( ) const

Returns filter count.

Returns
The filter count. By default, there is no filter.
const IlString& IlvFileChooserOptions::getFilterExtension ( IlUShort  index) const

Returns a filter extension.

Returns a filter extension.

Parameters
indexThe filter index in the filter array. The index value must be valid starting from 0.
Returns
The filter extension.
const IlString& IlvFileChooserOptions::getFilterText ( IlUShort  index) const

Returns a filter description.

Returns a filter description.

Parameters
indexThe filter index in the filter array. The index value must be valid starting from 0.
Returns
The filter description.
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.

Parameters
nameThe name of the label.
Returns
The label.
virtual const char* IlvFileChooserOptions::getLabel ( IlvDisplay display,
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.

Parameters
displayThe connection to the display.
nameThe name of the label.
Returns
The translated 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.

Returns
The width of the labels. The default width is 90.
virtual IlInt IlvFileChooserOptions::getOptionsButtonWidth ( ) const
virtual

Returns the width of the toolbar buttons.

Returns
The width of the toolbar buttons. The default width is 23.
IlvFileChooserSelection IlvFileChooserOptions::getSelectionType ( ) const

Returns selection type.

Returns
The selection type. The default value is 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.

Returns
The title.
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.

Returns
The height of the toolbar. The default height is 27.
IlvFileChooserType IlvFileChooserOptions::getType ( ) const

Returns dialog type.

Returns
The dialog type. The default value is 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).

Returns
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.

Returns
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.

Returns
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.

Returns
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.

Returns
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.

Returns
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.

Returns
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.

Returns
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.

Returns
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.

Parameters
nameThe bitmap name in the dialog.
filenameThe 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.

Parameters
heightThe 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.

Parameters
nameThe name of the tooltip.
tooltipThe 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.

Parameters
widthThe 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.

Parameters
modeThe display mode.
void IlvFileChooserOptions::setDefaultFilter ( IlUShort  index)

Sets the default filter index.

Sets the default filter index. The index value is not checked.

Parameters
indexThe filter index.
void IlvFileChooserOptions::setLabel ( IlvFileChooserLabel  name,
const IlString label 
)

Sets a label used by the dialog.

Sets a label used by the dialog.

Parameters
nameThe name of the label.
labelThe 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.

Parameters
widthThe width of the labels.
void IlvFileChooserOptions::setOptionsButtonWidth ( IlInt  width)

Sets the width of the toolbar buttons.

Sets the width of the toolbar buttons.

Parameters
widthThe width of the buttons.
void IlvFileChooserOptions::setTitle ( const IlString title)

Sets the dialog title.

Sets the dialog title.

Parameters
titleDialog 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.

Parameters
heightThe 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.

Parameters
showAllIf 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.

Parameters
showIf 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.

Parameters
showIf 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.

Parameters
showIf 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.

Parameters
showIf 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.

Parameters
showIf 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).

Parameters
compactIf 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.