rwlogo
Rogue Wave Views 5.5.1

Rogue Wave Views
Gadgets Package API Reference Guide

Product Documentation:

Rogue Wave Views
Documentation Home

IlvIFileSelector Class Reference

Dialog class. More...

#include <ilviews/gadgets/filesel.h>

Inheritance diagram for IlvIFileSelector:
IlvDialog IlvGadgetContainer IlvContainer IlvDrawingView IlvView IlvAbstractView IlvSystemPort IlvPort

List of all members.

Public Member Functions

 IlvIFileSelector (IlvDisplay *display, const char *dir=0, const char *filter=0, const char *fileordata=0, IlvSystemView transientFor=0, IlUInt properties=0)
 Constructor.
virtual void apply ()
 Is called when the callback associated with the apply symbol is triggered.
const char * get (IlBoolean grab=IlFalse, IlvCursor *cursor=0)
 Displays the dialog as a modal dialog.
const char * getDirectory () const
 Returns the current selected directory.
const char * getFilter () const
 Returns the current filter.
const char * getResult () const
 Returns the current full path name.
void reset ()
 Reinitializes the dialog.
void setDirectory (const char *dir, IlBoolean reset=IlFalse)
 Sets the current directory.
void setFilter (const char *filter, IlBoolean reset=IlFalse)
 Sets the current filter.
void setLabel (const char *label)
 Sets the label of the object called "<code>title</code>".

Detailed Description

Dialog class.

Library: ilvadvgdt

The IlvIFileSelector class lets you browse through a directory hierarchy and select a file name. The names of the graphic objects are displayed to let you change the default look of the dialog.

IlvIFileSelectora.gif

- IlvIFileSelector -

See also:
IlvFileBrowser, IlvFileSelector.

Constructor & Destructor Documentation

IlvIFileSelector::IlvIFileSelector ( IlvDisplay display,
const char *  dir = 0,
const char *  filter = 0,
const char *  fileordata = 0,
IlvSystemView  transientFor = 0,
IlUInt  properties = 0 
)

Constructor.

Initializes a new instance of the IlvIFileSelector class.

Parameters:
display The connection to the display.
dir The initial directory that will be scanned.
filter The initial filter. The file selector displays only files that match the pattern defined by this filter.
fileordata Specifies an alternative source of Rogue Wave Views data that defines the user interface of this dialog. This data may either be contained in a file, in which case fileordata is the name of the file, or in a C++ string, in which case fileordata is the string itself. If fileordata is not specified, the default dialog is used.
transientFor The system view for which the dialog is transient. See the IlvView constructors for more details.

Member Function Documentation

virtual void IlvIFileSelector::apply (  )  [virtual]

Is called when the callback associated with the apply symbol is triggered.

Sets this object so that wasCanceled returns IlFalse, then hides the dialog box.

See also:
cancel, wasCanceled

Reimplemented from IlvDialog.

const char* IlvIFileSelector::get ( IlBoolean  grab = IlFalse,
IlvCursor cursor = 0 
)

Displays the dialog as a modal dialog.

Parameters:
grab A Boolean value specifying whether the dialog should be system modal. A system modal dialog grabs input events occurring on the entire system so that other applications cannot catch any keyboard or mouse events until the member function returns. In this case, you can specify the cursor to be used with the cursor parameter. If grab is set to IlFalse (the default), the dialog is application modal, which means that the application does not receive input events in other windows.
cursor The cursor used to make the selection.
Returns:
The selected file name.
Warning:
[note] Some operating systems, such as Windows NT and Windows 95, do not allow system modal dialogs. On these operating system dialogs are always application modal.
See also:
getResult
const char* IlvIFileSelector::getDirectory (  )  const

Returns the current selected directory.

Returns:
The current selected directory.
See also:
getResult
const char* IlvIFileSelector::getFilter (  )  const

Returns the current filter.

Returns:
The current filter.
See also:
setFilter
const char* IlvIFileSelector::getResult (  )  const

Returns the current full path name.

Returns:
The current full path name.
See also:
getDirectory
void IlvIFileSelector::reset (  ) 

Reinitializes the dialog.

Updates the file selector according to the filter, the current directory, and its other parameters.

See also:
setDirectory
void IlvIFileSelector::setDirectory ( const char *  dir,
IlBoolean  reset = IlFalse 
)

Sets the current directory.

Parameters:
dir The new directory.
reset A Boolean value specifying whether the IlvIFileSelector::reset method should be called after changing the directory.
See also:
reset
void IlvIFileSelector::setFilter ( const char *  filter,
IlBoolean  reset = IlFalse 
)

Sets the current filter.

The file selector displays only files that match the pattern defined by the filter.

Parameters:
filter The new filter.
reset A Boolean value specifying whether the IlvIFileSelector::reset method should be called after changing the filter.
See also:
getFilter
void IlvIFileSelector::setLabel ( const char *  label  ) 

Sets the label of the object called "<code>title</code>".

See the figure above for more information.

Parameters:
label The new label.

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