vdk 2.4.0
Public Member Functions | Public Attributes | List of all members
VDKFileDialog Class Reference

Provides a file selection modal window that supports multiple file selection. More...

#include <FileDialog.h>

Inheritance diagram for VDKFileDialog:
VDKForm VDKObject VDKNotCopyAble VDKFileSaveAsDialog

Public Member Functions

bool CanClose ()
virtual void Setup (void)
- Public Member Functions inherited from VDKForm
 VDKForm (VDKApplication *app, char *title=(char *) NULL, int mode=v_box, GtkWindowType display=GTK_WINDOW_TOPLEVEL)
 VDKForm (VDKForm *owner, char *title=(char *) NULL, int mode=v_box, GtkWindowType display=GTK_WINDOW_TOPLEVEL)
virtual ~VDKForm ()
bool Destroy ()
virtual int isA ()
VDKBoxBox ()
virtual void Show (GtkWindowPosition pos=GTK_WIN_POS_NONE)
virtual void Hide ()
virtual void ShowModal (GtkWindowPosition pos=GTK_WIN_POS_NONE)
bool IsModal ()
virtual void Add (VDKObject *obj, int justify=l_justify, int expand=TRUE, int fill=TRUE, int padding=1)
VDKFormOwner ()
virtual void Close (void)
void Raise ()
void Lower ()
void SetVisible (bool flag)
bool GetVisible ()
- Public Member Functions inherited from VDKObject
VDKRgb GetBackground (GtkStateType state=GTK_STATE_NORMAL)
VDKRgb GetForeground (GtkStateType state=GTK_STATE_NORMAL)
 VDKObject (VDKForm *owner=NULL)
 VDKObject (VDKForm *owner, GtkWidget *widget)
virtual ~VDKObject ()
virtual GtkWidget * Widget ()
GtkWidget * ConnectingWidget ()
GtkWidget * WrappedWidget ()
virtual void SetFont (VDKFont *f)
VDKFontGetFont ()
void SetCursor (VDKCursorType)
VDKCursorType GetCursor ()
virtual void SetForeground (VDKRgb color, GtkStateType state=GTK_STATE_NORMAL)
virtual void SetBackground (VDKRgb color, GtkStateType state=GTK_STATE_NORMAL)
void SetSize (int w, int h)
void SetUsize (VDKPoint s)
virtual void SetTip (char *)
ItemListItems ()
void Draw (GdkRectangle *area=NULL)
void SignalEmit (int signal)
void SignalEmit (char *sig)
void SignalEmitParent (int signal)
void SignalEmitParent (char *sig)
void GrabFocus ()
VDKObjectParent (VDKObject *p=NULL)
int SignalConnect (VDKObject *obj, char *signal, bool(VDKObject::*method)(VDKObject *), bool gtk=true, bool after=false)
int SignalConnect (char *signal, bool(VDKObject::*method)(VDKObject *), bool gtk=true, bool after=false)
bool SignalDisconnect (int connection)
int EventConnect (VDKObject *obj, char *event, bool(VDKObject::*method)(VDKObject *, GdkEvent *), bool after=false)
int EventConnect (char *, bool(VDKObject::*)(VDKObject *, GdkEvent *), bool after=false)
bool EventDisconnect (int connection)

Public Attributes

VDKReadWriteValueProp
< VDKFileDialog, VDKString
Filter

Additional Inherited Members

- Protected Attributes inherited from VDKForm
VDKApplicationapp
ChildList childs
GtkWidget * window
VDKBoxbox
bool isModal
bool never_showed
VDKPoint _oldSize
int modalCount

Detailed Description

Provides a file selection modal window that supports multiple file selection.

Usage
#include <vdk/FileDialog.h>
FileStringArray selections;
VDKFileDialog *child = new VDKFileDialog( Application()->MainForm,
&selections, "File Open dialog");
child->Filter = "*.cc";
child->ShowModal();
for( int t = 0; t < selections.size(); t++)
{
printf("\nselection:%s",(char*) selections[t]);
fflush(stdout);
}
On return selections will be an empty array if user presses "cancel" button.
Tip
#define _USE_FNMATCH Undefining above line into FileDialog.h and recompiling make possible to use regex library for filters. i.e:
child->Filter = "*\.(cc|h)$"

Member Function Documentation

bool VDKFileDialog::CanClose ( void  )
virtual

Placeholder for subclasses. User should override this returning a false (don't close) or true (close) value.

Reimplemented from VDKForm.

virtual void VDKFileDialog::Setup ( void  )
inlinevirtual

Must be overridden by subclasses, in this method user fills form with useful widgets

Implements VDKForm.

Member Data Documentation

VDKReadWriteValueProp<VDKFileDialog,VDKString> VDKFileDialog::Filter

Sets/gets file filter


The documentation for this class was generated from the following files: