rwlogo
Rogue Wave Views 5.6

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvFileChooserOptions Class Reference

File chooser options class. More...

#include <ilviews/gadgets/filechoo.h>

List of all members.

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

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:
typ The type of dialog.
sel The 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:
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.

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

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

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

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

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

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

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

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

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

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

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

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

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

Sets the dialog title.

Sets the dialog title.

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

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

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

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

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

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

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

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

Parameters:
compact If the value is IlTrue, Compact mode is used to display the sizes.
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Friends Defines

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