Views
Gadgets Package API Reference Guide
Product Documentation:
Views Documentation Home
List of all members | Public Member Functions
IlvIFileSelector Class Reference

Dialog class. More...

#include <ilviews/gadgets/filesel.h>

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

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. More...
 
virtual void apply ()
 Is called when the callback associated with the apply symbol is triggered. More...
 
const char * get (IlBoolean grab=IlFalse, IlvCursor *cursor=0)
 Displays the dialog as a modal dialog. More...
 
const char * getDirectory () const
 Returns the current selected directory. More...
 
const char * getFilter () const
 Returns the current filter. More...
 
const char * getResult () const
 Returns the current full path name. More...
 
void reset ()
 Reinitializes the dialog. More...
 
void setDirectory (const char *dir, IlBoolean reset=IlFalse)
 Sets the current directory. More...
 
void setFilter (const char *filter, IlBoolean reset=IlFalse)
 Sets the current filter. More...
 
void setLabel (const char *label)
 Sets the label of this object. More...
 
- Public Member Functions inherited from IlvDialog
 IlvDialog (IlvDisplay *display, const char *name, const char *title, const char *filename, const IlvRect *rect=0)
 Constructor. More...
 
 IlvDialog (IlvDisplay *display, const char *name, const char *title, const char *filename, IlUInt properties, const IlvRect *rect=0, IlvSystemView transientFor=0)
 Constructor. More...
 
 IlvDialog (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlUInt properties=0, IlvSystemView transientFor=0)
 Constructor. More...
 
virtual void cancel ()
 Is called when the callback associated with the cancel symbol is triggered. More...
 
virtual void wait (IlBoolean grab=IlFalse, IlvCursor *cursor=0)
 Displays a modal dialog. More...
 
IlBoolean wasCanceled () const
 Returns the status of the dialog after closing it. More...
 
- Public Member Functions inherited from IlvGadgetContainer
 IlvGadgetContainer (IlvAbstractView *parent, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue)
 Initializes a new instance of the IlvGadgetContainer class as a child view of another view. More...
 
 IlvGadgetContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue)
 Initializes a new instance of the IlvGadgetContainer class as a top view. More...
 
 IlvGadgetContainer (IlvDisplay *display, const char *name, const char *title, const IlvRect &rect, IlUInt properties, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue, IlvSystemView transientFor=0)
 Initializes a new instance of the IlvGadgetContainer class as a top view. More...
 
 IlvGadgetContainer (IlvDisplay *display, IlvSystemView parent, const IlvRect &rect, IlBoolean useacc=IlFalse, IlBoolean visible=IlTrue)
 Initializes a new instance of the IlvGadgetContainer class as a child view of a system view. More...
 
 IlvGadgetContainer (IlvDisplay *display, IlvSystemView window, IlBoolean useacc=IlFalse)
 Initializes a new instance of the IlvGadgetContainer class using an existing system view. More...
 
virtual IlBoolean allowFocus (IlBoolean value)
 Specifies whether the container manages the focus. More...
 
virtual void applyResize (IlFloat sx, IlFloat sy, IlBoolean redraw=IlTrue)
 Is called to carry out the resize events applying to the gadget container. More...
 
IlBoolean autoResize (IlBoolean a)
 Sets the auto resize mode of the gadget container. More...
 
IlvButtongetDefaultButton () const
 Returns the default button of the gadget container. More...
 
virtual IlvGraphicgetFirstFocusGraphic () const
 Returns the first object that receives the focus in this container. More...
 
virtual IlvGraphicgetFocus () const
 Returns the object that has the keyboard focus in the gadget container. More...
 
virtual IlvGraphicgetGrab () const
 Returns the object that is currently grabbing events in the container. More...
 
virtual IlvGraphicgetLastFocusGraphic () const
 Returns the last object that receives the focus in this container. More...
 
IlvLookFeelHandlergetLookFeelHandler () const
 Returns the look and feel handler associated with this container. More...
 
virtual IlvGraphicgetNextFocusGraphic (IlvGraphic *object) const
 Returns the next object that will receive the focus after the specified object. More...
 
IlvGraphicgetOverriddenFocus () const
 Returns the object that will receive the focus after calling setFocus(). More...
 
virtual IlvGraphicgetPreviousFocusGraphic (IlvGraphic *object) const
 Returns the previous object that received the focus before the specified object. More...
 
IlBoolean isAutoResizing () const
 Indicates whether the gadget container gets resized when loading a file. More...
 
virtual IlBoolean isFocusAllowed () const
 Indicates whether the focus is allowed in the container. More...
 
virtual void moveFocusAfter (IlBoolean redraw=IlTrue)
 Is called to find the next focusable object. More...
 
virtual void moveFocusBefore (IlBoolean redraw=IlTrue)
 Is called to find the previous focusable object. More...
 
void overrideFocus (IlvGraphic *obj)
 Sets the object that will receive the focus after calling setFocus(). More...
 
virtual void removeGrab ()
 Cancels the grabbing settings defined with setGrab(). More...
 
void setDefaultButton (IlvButton *button, IlBoolean redraw=IlTrue)
 Sets the default button of the gadget container. More...
 
virtual void setFocus (IlvGraphic *graphic=0, IlBoolean redraw=IlTrue)
 Sets the focus to the specified object of the gadget container. More...
 
virtual void setGrab (IlvGraphic *object)
 Sets the specified object as the grabbing object. More...
 
void setLookFeelHandler (IlvLookFeelHandler *lfh)
 Sets the look and feel handler of this container. More...
 

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.

- IlvIFileSelector -

See also
IlvFileBrowser, IlvFileSelector.

Constructor & Destructor Documentation

◆ IlvIFileSelector()

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
displayThe connection to the display.
dirThe initial directory that will be scanned.
filterThe initial filter. The file selector displays only files that match the pattern defined by this filter.
fileordataSpecifies 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.
transientForThe system view for which the dialog is transient. See the IlvView constructors for more details.
propertiesThe top-window properties (see IlvView(IlvDisplay*, const char*, const char*, const IlvRect&, IlUInt, IlBoolean, IlvSystemView) for details.

Member Function Documentation

◆ apply()

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.

◆ get()

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

Displays the dialog as a modal dialog.

Parameters
grabSpecifies 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.
cursorThe cursor used to make the selection.
Returns
The selected file name.
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().

◆ getDirectory()

const char* IlvIFileSelector::getDirectory ( ) const

Returns the current selected directory.

Returns
The current selected directory.
See also
getResult().

◆ getFilter()

const char* IlvIFileSelector::getFilter ( ) const

Returns the current filter.

Returns
The current filter.
See also
setFilter().

◆ getResult()

const char* IlvIFileSelector::getResult ( ) const

Returns the current full path name.

Returns
The current full path name.
See also
getDirectory().

◆ reset()

void IlvIFileSelector::reset ( )

Reinitializes the dialog.

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

See also
setDirectory().

◆ setDirectory()

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

Sets the current directory.

Parameters
dirThe new directory.
resetA Boolean value specifying whether the reset() method should be called after changing the directory.
See also
reset().

◆ setFilter()

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
filterThe new filter.
resetA Boolean value specifying whether the reset() method should be called after changing the filter.
See also
getFilter().

◆ setLabel()

void IlvIFileSelector::setLabel ( const char *  label)

Sets the label of this object.

See the figure above for more information.

Parameters
labelThe new label.