You may return to the Cvo Object Documenation Index from this document. This document contains the following sections describing the Cvo__OpenFile object:

Class

Cvo__OpenFile

Base

Cvo_Window

Syntax

#include <Cvo/OpenFile.h++>

void Cvo_OpenFile ( Cvo_Object *parent,
XEvent *event,
Cvo_OpenFileInfo *info )

Overview

This object provides a method to allow a user to browse the file system and select a filename. It will create a window with several selection areas for a filename, a filename filter, a list of directories, and a list of files in the current directory which match the given filename filter. The window has two buttons, one for selecting the currently highlighted filename, and one for dismissing the window. The window has a Cvo_Pin, and when pressed in, the window will not close when a filename is selected.

The object should always be created by the Cvo_OpenFile() function. This function takes arguments in the event handler style, since Cvo__OpenFile objects will generally be created from menus. To create a Cvo__OpenFile object from a menu, simply use Cvo_OpenFile() as the func argument to Cvo_MenuItem and Cvo_MenuEntry objects.

The parent argument will be used when positioning the Cvo__OpenFile window, and when selecting the object which will receive the CvoOpenFileEvent from the Cvo__OpenFile object. The event will be passed to the root of the object tree containing parent. In other words, if parent is a Cvo_Button object, which is a child of a Cvo_Frame object, which is a child of a Cvo_Application object, then the CvoOpenFileEvent will be sent to the Cvo_Application object.

The info argument should be a pointer to a Cvo_OpenFileInfo object. Note that when creating a Cvo__OpenFile object from a menu, the data argument to Cvo_MenuItem or Cvo_MenuEntry should be info, a pointer to a Cvo_OpenFileInfo object.

The X resource name of the info object will be used to locate resources for this Cvo__OpenFile object. For instance, if the info object was created with a resource name of openfile, then the resource *openfile.Title will be used to set the title for this Cvo__OpenFile object.

In addition, the Cvo_OpenFileInfo object has several member functions which can be used to modify the behavior of the Cvo__OpenFile object it is associated with.

Cvo Events

This object defines the following Cvo Events in addition to those defined by its parent and ancestor objects.

Children Objects

This object is composed of the following Cvo objects. Each object has the shown resource name. This link displays the composition of the parent object.

New X Resources

This object uses the following X resources in addition to those used by its parent and ancestor objects.


See the example source code for an example of how to use this object.


See the legend for information about the conventions used in this documentation.