Laxkit
0.0.7.1
|
A dialog for selecting files. More...
Public Member Functions | |
FileDialog (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, unsigned long nowner, const char *nsend, unsigned long ndstyle, const char *nfile=NULL, const char *npath=NULL, const char *nmask=NULL, const char *nrecentgroup=NULL) | |
Constructor. | |
virtual const char * | whattype () |
virtual void | OkButton (const char *textforok, const char *ttip) |
Change the text on the "Ok" button to something else. | |
virtual void | AddFinalButton (const char *text, const char *ttip, int id, int position) |
Add another final button. | |
virtual int | ClearFinalButton (int position) |
Remove a final button. | |
virtual void | Recent (const char *group) |
Use this group for recent files. | |
virtual int | preinit () |
Set win_w and win_h to sane values if necessary. | |
virtual int | init () |
virtual int | GetState (void **state) |
virtual int | Event (const EventData *e, const char *mes) |
virtual int | send (int id) |
Send the file name(s) to owner. | |
virtual void | GoUp () |
Go up in the file hierarchy, and set path text. | |
virtual void | Cd (const char *to) |
Change directory to path/to if to is relative, or just to if it is absolute. Also set the path field. | |
virtual void | RefreshDir () |
Refresh the current directory listing. | |
virtual void | SetFile (const char *f) |
Assume file is a file path, update file and path fields. | |
virtual int | CharInput (unsigned int ch, const char *buffer, int len, unsigned int state, const LaxKeyboard *d) |
Cancel if ESC. | |
virtual char * | fullFilePath (const char *f) |
In a new char[], return path/f, or path/file if f==NULL. | |
Public Member Functions inherited from Laxkit::RowFrame | |
RowFrame (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long owner, const char *mes, int npad=0) | |
RowFrame constructor. | |
virtual int | Sync (int add=0) |
Sync the boxes to win_w/win_h, which are assumed set already. | |
virtual int | MoveResize (int nx, int ny, int nw, int nh) |
Calls anXWindow::MoveResize, then Sync(0). | |
virtual int | Resize (int nw, int nh) |
Calls anXWindow::Resize, then Sync(0). | |
virtual int | findWindowIndex (const char *name) |
Return the index in RowColBox::wholelist containing a window with name as the title. | |
virtual anXWindow * | findWindow (const char *name) |
Return the window in RowColBox::wholelist that has name as its win_name or win_title. | |
virtual int | AddNull (int where=-1) |
Call this to insert a line break into the window stack. | |
virtual int | AddHSpacer (int npw, int nws, int nwg, int nhalign, int where=-1) |
virtual int | AddVSpacer (int npw, int nws, int nwg, int nhalign, int where=-1) |
virtual int | AddSpacer (int npw, int nws, int nwg, int nhalign, int nph, int nhs, int nhg, int nvalign, int where=-1) |
virtual int | AddWin (WinFrameBox *box, char islocal=1, int where=-1) |
Add an already made WinFrameBox. | |
virtual int | AddWin (anXWindow *win, int absorbcount, int where) |
Add a window using the window's width and height with no squishability. | |
virtual int | AddWin (anXWindow *win, int absorbcount, int npw, int nws, int nwg, int nhalign, int nhgap, int nph, int nhs, int nhg, int nvalign, int nvgap, int where) |
Add a window with squish values. | |
virtual void | Refresh () |
Call Sync(0) if arrangedstate!=1. | |
Public Member Functions inherited from Laxkit::anXWindow | |
anXWindow (anXWindow *parnt, const char *nname, const char *ntitle, unsigned long nstyle, int xx, int yy, int ww, int hh, int brder, anXWindow *prev, unsigned long nowner, const char *nsend) | |
Constructor. | |
virtual | ~anXWindow () |
anXWindow destructor. Its X window should have been XDestroy'd before here. | |
virtual const char * | WindowTitle (int which=0) |
Return basically the name of the window. | |
virtual void | WindowTitle (const char *newtitle) |
Change the title of the window. This text would usually be displayed in the bar provided by a window manager. | |
virtual const char * | tooltip (int mouseid=0) |
By default, return win_tooltip. | |
virtual const char * | tooltip (const char *newtooltip) |
Replace the current tooltip, return the current tooltip (after replacing). | |
virtual anXWindow * | findChildWindowByTitle (const char *title) |
Find the first immediate child window that has win_title==title. | |
virtual anXWindow * | findChildWindowByName (const char *name) |
Find the first immediate child window that has win_name==name. | |
virtual int | Grayed () |
Return whether this window is grayed. | |
virtual int | Grayed (int g) |
Set the gray state of this window. Returns Grayed(void). | |
virtual int | close () |
Called by anXApp from anXApp::destroywindow() when a window is to be destroyed. | |
virtual int | Idle (int tid=0) |
anXWindow::Idle() is an empty placeholeder. Just returns 1. | |
virtual Displayer * | MakeCurrent () |
virtual int | Needtodraw () |
Default is to return needtodraw. | |
virtual void | Needtodraw (int nntd) |
If 0, then the window does not need refreshing. Otherwise it does. | |
virtual int | deletenow () |
Return whether the window is allowed to be deleted. | |
virtual int | setWinStyle (unsigned int stylebit, int newvalue) |
Control various window related basic styling of win_style. | |
virtual int | getWinStyle (unsigned int stylebit) |
Currently, simply return win_style&stylebit. | |
virtual void | installColors (WindowColors *newcolors) |
Dec_count old and inc_count new. | |
virtual ShortcutHandler * | GetShortcuts () |
Return a ShortcutHandler that contains stacks of bound shortcuts and possible window actions. | |
virtual int | PerformAction (int action_number) |
virtual int | ExposeChange (ScreenEventData *e) |
Default behavior on Expose events is to call Needtodraw(1). | |
virtual int | DeviceChange (const DeviceEventData *e) |
virtual int | KeyUp (unsigned int ch, unsigned int state, const LaxKeyboard *kb) |
Called when a key is released. | |
virtual int | MouseMove (int x, int y, unsigned int state, const LaxMouse *m) |
Empty placeholder, just returns 1. | |
virtual int | ButtonDown (int button, int x, int y, unsigned int state, int count, const LaxMouse *m) |
virtual int | ButtonUp (int button, int x, int y, unsigned int state, const LaxMouse *m) |
virtual int | LBDown (int x, int y, unsigned int state, int count, const LaxMouse *d) |
Default is just to return 1. | |
virtual int | LBUp (int x, int y, unsigned int state, const LaxMouse *d) |
Default is just to return 1. | |
virtual int | MBDown (int x, int y, unsigned int state, int count, const LaxMouse *d) |
Default is just to return 1. | |
virtual int | MBUp (int x, int y, unsigned int state, const LaxMouse *d) |
Default is just to return 1. | |
virtual int | RBDown (int x, int y, unsigned int state, int count, const LaxMouse *d) |
Default is just to return 1. | |
virtual int | RBUp (int x, int y, unsigned int state, const LaxMouse *d) |
Default is just to return 1. | |
virtual int | WheelUp (int x, int y, unsigned int state, int count, const LaxMouse *d) |
The wheel mouse rolling up. Default is just to return 1. | |
virtual int | WheelDown (int x, int y, unsigned int state, int count, const LaxMouse *d) |
The wheel mouse rolling down. Default is just to return 1. | |
virtual int | FocusOn (const FocusChangeData *e) |
Increment win_active, and highlights the window's border, if the event refers to this window. | |
virtual int | FocusOff (const FocusChangeData *e) |
Decrements win_active, and de-highlights the window's border if win_active==0, if event is a real focus off. | |
virtual void | contentChanged () |
Windows may call this when their contents change. | |
virtual void | selectionChanged () |
Windows may call this when their selections change. | |
virtual anXWindow * | GetController () |
Return the window most relevant for tab control loops. | |
virtual int | SelectNextControl (const LaxDevice *d) |
Transfer focus to nextcontrol. | |
virtual int | SelectPrevControl (const LaxDevice *d) |
Transfer the focus to prevcontrol. | |
virtual void | ControlActivation (int on) |
Do special activation or not when controls are activated by tabbing. | |
virtual int | AddPrevControl (anXWindow *prev) |
virtual int | AddNextControl (anXWindow *next) |
virtual int | ConnectControl (anXWindow *towhat, int after=1) |
Connect towhat to this. Used for tab loops. | |
virtual int | CloseControlLoop () |
Close a tab loop. | |
virtual void | SetOwner (anXWindow *nowner, const char *mes=NULL, unsigned int send_mask=0) |
Set the new owner and control message. | |
virtual void | SetOwner (unsigned long nowner_id, const char *mes=NULL, unsigned int send_mask=0) |
virtual void | dump_out (FILE *f, int indent, int what, anObject *context) |
Simple dumping function. | |
virtual LaxFiles::Attribute * | dump_out_atts (LaxFiles::Attribute *att, int what, anObject *context) |
virtual void | dump_in_atts (LaxFiles::Attribute *att, int flag, anObject *context) |
Public Member Functions inherited from Laxkit::Tagged | |
virtual int | HasTag (const char *tag, int casematters) |
Return whether the tag exists. | |
virtual int | NumberOfTags () |
Return the number of tags, strangely enough. | |
virtual const char * | GetTag (int i) |
Return const pointer to the tag text for tag number i, where i==0 is the first tag. | |
virtual char * | GetAllTags () |
Return a new char[] with a space separated list of all the tags. | |
virtual int | InsertTags (const char *tags, int casematters) |
Insert tags from a string such as 'tag1 tag2 tag3 "tag with spaces" tag4'. | |
virtual int | InsertTag (const char *tag, int casematters) |
Insert tag if it doesn't exist already. | |
virtual int | RemoveTag (const char *tag) |
The tag must be an exact match. | |
virtual int | RemoveTag (int i) |
Remove tag number i. i must be in range [0..NumberOfTags()-1]. | |
virtual void | FlushTags () |
Public Member Functions inherited from LaxFiles::DumpUtility | |
virtual void | dump_in (FILE *f, int indent, int what, Laxkit::anObject *loadcontext, Attribute **att) |
Read in a file segment as an Attribute, and pass parsing duties to dump_in_atts. | |
virtual | ~DumpUtility () |
Empty virtual destructor. | |
Public Member Functions inherited from Laxkit::aDrawable | |
aDrawable (Drawable d=0) | |
virtual int | DrawableType () |
virtual int | ValidDrawable () |
Public Member Functions inherited from Laxkit::RowColBox | |
RowColBox (unsigned int nflags, int nx, int nw, int npw, int nws, int nwg, int nhalign, int nhgap, int ny, int nh, int nph, int nhs, int nhg, int nvalign, int nvgap) | |
Main RowColBox constructor. | |
virtual void | Push (SquishyBox *box, char islocal=0, int where=-1) |
Push box onto wholelist with islocal. | |
virtual int | Pop (int which=-1) |
Remove box with index which from wholelist. | |
virtual void | Flush () |
Flush list, and if list does not exist, then create a new list. | |
virtual int | arrangeBoxes (int distributetoo=0) |
Set up SquishyBox::list to contain rows and columns based on boxes in wholelist. | |
virtual int | distributeBoxes (int setmetrics=0) |
Assign the x,y,w,h of the child boxes. | |
Public Member Functions inherited from Laxkit::ListBox | |
ListBox (unsigned int flag=0) | |
Create box as either BOX_VERTICAL or BOX_HORIZONTAL. Other flag values are ignored. | |
ListBox (unsigned int nflags, int nx, int nw, int npw, int nws, int nwg, int nhalign, int nhgap, int ny, int nh, int nph, int nhs, int nhg, int nvalign, int nvgap) | |
virtual int | WrapToExtent () |
Sets this->pw,s,g/ph,s,g to be the sum of the metrics of the boxes in list. | |
virtual void | sync () |
Sync the box to the already set values of x,y,w,h. | |
virtual int | figureDimensions (ListBox *target, int *nextrow=NULL, SquishyBox **boxes=NULL, int n=0, double *squishx=NULL, double *squishy=NULL) |
Finds pw,s,g/ph,s,g based on the boxes in list. | |
Public Member Functions inherited from Laxkit::SquishyBox | |
SquishyBox (unsigned int nflags, int nx, int nw, int npw, int nws, int nwg, int nhalign, int nhgap, int ny, int nh, int nph, int nhs, int nhg, int nvalign, int nvgap) | |
SquishyBox Constructor. | |
virtual int | hideBox (int yeshide) |
hideBox(0) makes the box visible, otherwise, make it hidden. Returns state after call. | |
virtual int | hidden () |
Return whether the box is hidden or not. | |
virtual void | sync (int xx, int yy, int ww, int hh) |
Sync the box to x,y,w,h. | |
virtual int | x () |
virtual int | w () |
virtual int | pw () |
virtual int | ws () |
virtual int | wg () |
virtual int | halign () |
virtual int | hgap () |
virtual int | y () |
virtual int | h () |
virtual int | ph () |
virtual int | hs () |
virtual int | hg () |
virtual int | valign () |
virtual int | vgap () |
virtual int | x (int val) |
virtual int | w (int val) |
virtual int | pw (int val) |
virtual int | ws (int val) |
virtual int | wg (int val) |
virtual int | halign (int val) |
virtual int | hgap (int val) |
virtual int | y (int val) |
virtual int | h (int val) |
virtual int | ph (int val) |
virtual int | hs (int val) |
virtual int | hg (int val) |
virtual int | valign (int val) |
virtual int | vgap (int val) |
virtual int | fpenalty () |
virtual int | fpenalty (int val) |
virtual int | lpenalty () |
virtual int | lpenalty (int val) |
Protected Member Functions | |
int | getDirectory (const char *npath) |
Fill the files MenuInfo with all the matching files. | |
virtual int | newBookmark (const char *pth) |
Add a new bookmark via anXApp::Resource() and a "Bookmarks" resource. | |
virtual MenuInfo * | BuildBookmarks () |
virtual int | closeWindow () |
Set app->load_dir or app->save_dir to path. |
Protected Attributes | |
MenuInfo | files |
LineInput * | path |
LineInput * | mask |
LineInput * | file |
MenuSelector * | filelist |
FilePreviewer * | previewer |
unsigned long | dialog_style |
Style flags for the dialog. | |
Button * | ok |
char * | recentgroup |
int | finalbuttons |
Additional Inherited Members | |
Public Attributes inherited from Laxkit::RowFrame | |
unsigned long | highlight |
unsigned long | shadow |
unsigned long | mobkcolor |
unsigned long | bkcolor |
Public Attributes inherited from Laxkit::anXWindow | |
WindowColors * | win_colors |
anXApp * | app |
char * | win_name |
An arbitrary string to be used as an id. | |
char * | win_title |
The title of the window. | |
anXWindow * | win_parent |
int | win_screen |
unsigned long | win_style |
int | win_x |
int | win_y |
int | win_w |
int | win_h |
unsigned int | win_border |
int | win_pointer_shape |
Identifier for a stock mouse shape. | |
char | win_on |
Nonzero if the window is mapped. | |
char | win_active |
Should be positive when the window has a keyboard focus, 0 otherwise. | |
unsigned long | win_owner |
Who gets control messages from this window. | |
unsigned int | win_owner_send_mask |
char * | win_sendthis |
The type of message that gets sent to owner. | |
anXWindow * | nextcontrol |
anXWindow * | prevcontrol |
Public Attributes inherited from Laxkit::Tagged | |
int | sorttags |
Public Attributes inherited from Laxkit::RowColBox | |
unsigned int | elementflags |
Public Attributes inherited from Laxkit::ListBox | |
PtrStack< SquishyBox > | list |
Public Attributes inherited from Laxkit::SquishyBox | |
int | m [14] |
int | pad |
Pad placed around a box, which can be where a bevel or window border would go. | |
int | padinset |
Pad to inset the child boxes. | |
int | fpen |
The penalty in the flow direction. | |
int | lpen |
The penalty perpendicular to the flow direction. | |
unsigned long | flags |
A dialog for selecting files.
FILES_OPEN_ONE still allows multiple to be selected..
*** progressive update when typing file name in file slot. if file is not part of currently selected files, then reset filelist selection. each filelist file selection should update the file slot
***need a special path box to allow easy sanity checking... maybe not even allow editing in path or mask, only in file....or only file and mask
A dialog to open one or more files, save files, or select directories. If FILES_OPEN_ONE, only one file may be opened. When a file is selected, then a StrEventData with that file in it is sent to the dialog's owner. If FILES_OPEN_MANY, then more than one file may be opened at one time, and a StrsEventData is used instead, even if there is only 1 file selected.
Laxkit::FileDialog::FileDialog | ( | anXWindow * | parnt, |
const char * | nname, | ||
const char * | ntitle, | ||
unsigned long | nstyle, | ||
int | xx, | ||
int | yy, | ||
int | ww, | ||
int | hh, | ||
int | brder, | ||
unsigned long | nowner, | ||
const char * | nsend, | ||
unsigned long | ndstyle, | ||
const char * | nfile = NULL , |
||
const char * | npath = NULL , |
||
const char * | nmask = NULL , |
||
const char * | nrecentgroup = NULL |
||
) |
Constructor.
If nrecentgroup!=NULL, then use recent files. If nrecentgroup=="" then any group will be used. Otherwise, only recent items in ~/.recently-used with that group will show up in the Recent button.
Note that the previewer is not created, and the windows other than file, path and mask are not created until init(). All initial window layout is done in init().
References Laxkit::RowFrame::AddWin(), Laxkit::anXApp::addwindow(), dialog_style, LaxFiles::file_exists(), getDirectory(), lax_dirname(), Laxkit::PtrStack< T >::n, newstr(), Laxkit::LineInput::tooltip(), and Laxkit::RowColBox::wholelist.
|
virtual |
Add another final button.
By default, there is on "ok" type of button (whose text can be set with OkButton()) at position 0, and a "cancel" button at position 1 (unless FILES_NO_CANCEL is set in dialog_style). Those buttons were added in the constructor. This function allows easy addition of further buttons, for instance to have three buttons: "Open", "Open a copy", and "Cancel".
If id==0, then this button will act like a cancel button. id==1 is the same as pressing the standard "ok" button. Applications may use any other value for a button id.
If position>=0, then put it at this position (starting at 0) of the list of final buttons.
If ttip!=NULL, then that is the button's tooltip.
References Laxkit::RowFrame::AddWin(), and isblank().
|
protectedvirtual |
If the bookmark buttons does not exist, then return a new MenuInfo with the bookmarks in it. If the button already exists, then replace its menu with the new one, and return NULL.
References Laxkit::MenuInfo::AddItem(), Laxkit::MenuInfo::AddItems(), Laxkit::MenuInfo::AddSep(), deletestrs(), Laxkit::PtrStack< T >::e, Laxkit::anXWindow::findChildWindowByName(), LaxFiles::get_bookmarks(), Laxkit::MenuInfo::menuitems, Laxkit::PtrStack< T >::n, Laxkit::anXApp::Resource(), Laxkit::MenuButton::SetMenu(), and split().
Referenced by init(), and newBookmark().
|
virtual |
Change directory to path/to if to is relative, or just to if it is absolute. Also set the path field.
References appendstr(), getDirectory(), Laxkit::LineInput::GetText(), newstr(), and Laxkit::LineInput::SetText().
Remove a final button.
If position<0, then remove all the final buttons.
Return 0 for success, nonzero for error.
References Laxkit::anXApp::destroywindow(), Laxkit::PtrStack< T >::e, Laxkit::PtrStack< T >::n, Laxkit::RowColBox::Pop(), and Laxkit::RowColBox::wholelist.
|
protectedvirtual |
Set app->load_dir or app->save_dir to path.
If FILES_NO_CANCEL then set the app dirs, but do not call app->destroywindow(this).
Returns 1 for window set to be destroyed, else 0.
References Laxkit::anXApp::destroywindow(), dialog_style, Laxkit::LineInput::GetCText(), and makestr().
Referenced by CharInput(), and Event().
Reimplemented from Laxkit::anXWindow.
References appendnstr(), Cd(), closeWindow(), dialog_style, Laxkit::PtrStack< T >::e, LaxFiles::file_exists(), Laxkit::MenuInfo::findFromLine(), fullFilePath(), Laxkit::LineInput::GetCText(), getDirectory(), Laxkit::LineInput::GetLineEdit(), GoUp(), isblank(), lax_basename(), lax_dirname(), Laxkit::MenuInfo::menuitems, Laxkit::PtrStack< T >::n, Laxkit::anXWindow::Needtodraw(), newBookmark(), newstr(), Laxkit::FilePreviewer::Preview(), RefreshDir(), Laxkit::anXApp::rundialog(), send(), Laxkit::anXApp::SendMessage(), SetFile(), Laxkit::LineInput::SetText(), LaxFiles::simplify_path(), Laxkit::MenuItem::state, Laxkit::anXWindow::win_owner, and Laxkit::anXWindow::win_sendthis.
In a new char[], return path/f, or path/file if f==NULL.
If f (or file) appears to be an absolute path, use only that..
References LaxFiles::expand_home_inplace(), Laxkit::LineInput::GetCText(), newstr(), prependstr(), and LaxFiles::simplify_path().
Fill the files MenuInfo with all the matching files.
****** wrap this stuff into a FileMenuInfo!!!!!?? how to make the FileMenuItem have path/mask *** and don't forget about scandir!!
*** should return 0 success, nonzero error bad path, etc.
*** this needs much work to use multiple masks...
References Laxkit::MenuInfo::AddItem(), appendstr(), dialog_style, LaxFiles::file_exists(), Laxkit::RefPtrStack< T >::flush(), Laxkit::LineInput::GetCText(), makestr(), Laxkit::MenuInfo::menuitems, Laxkit::anXWindow::Needtodraw(), newstr(), Laxkit::MenuSelector::Select(), Laxkit::LineInput::SetText(), Laxkit::MenuInfo::Sort(), and Laxkit::MenuSelector::Sync().
Referenced by Cd(), Event(), FileDialog(), GoUp(), and RefreshDir().
|
virtual |
Unimplemented.
|
virtual |
Reimplemented from Laxkit::RowFrame.
References Laxkit::MenuInfo::AddItem(), Laxkit::RowFrame::AddNull(), Laxkit::RowFrame::AddWin(), appendstr(), BuildBookmarks(), Laxkit::anXWindow::CloseControlLoop(), Laxkit::anXWindow::ConnectControl(), deletestrs(), dialog_style, Laxkit::PtrStack< T >::e, isblank(), lax_basename(), lax_dirname(), Laxkit::PtrStack< T >::n, newstr(), LaxFiles::recently_used(), Laxkit::anXWindow::SetOwner(), split(), Laxkit::ButtonBase::State(), Laxkit::RowFrame::Sync(), Laxkit::anXWindow::tooltip(), and Laxkit::RowColBox::wholelist.
Add a new bookmark via anXApp::Resource() and a "Bookmarks" resource.
Return 0 for bookmark added, or positive for error and not added, and -1 for already exists.
Default is to add bookmark via add_bookmark(). This will store it globally for the user. If this is not desired, then FILES_GLOBAL_BOOKMARK must be removed from dialog_style.
References LaxFiles::add_bookmark(), BuildBookmarks(), dialog_style, Laxkit::PtrStack< T >::e, LaxFiles::file_exists(), Laxkit::PtrStack< T >::n, LaxFiles::Attribute::push(), and Laxkit::anXApp::Resource().
Referenced by Event().
Change the text on the "Ok" button to something else.
By default, that button will be "Ok" or "Open" or "Save". This function allows simple further adjustment.
If ttip!=NULL, then change the ok button tooltip also. If ttip!=NULL, but is blank, then clear the tooltip.
References Laxkit::PtrStack< T >::e, Laxkit::RowFrame::findWindowIndex(), isblank(), Laxkit::Button::Label(), Laxkit::anXWindow::tooltip(), Laxkit::RowColBox::wholelist, and Laxkit::Button::WrapToExtent().
|
virtual |
Use this group for recent files.
If group==NULL, then do not use the recent file button. If group=="", then use any group.
References makestr().
Send the file name(s) to owner.
Returns 0 if nothing sent. Else nonzero.
id will typically be 1 for "ok", and any other number will be the id from any additional final buttons.
References appendstr(), dialog_style, LaxFiles::file_exists(), fullFilePath(), Laxkit::LineInput::GetText(), isblank(), Laxkit::anXApp::rundialog(), Laxkit::anXApp::SendMessage(), Laxkit::MenuSelector::WhichSelected(), Laxkit::anXWindow::win_owner, and Laxkit::anXWindow::win_sendthis.
Referenced by Event().
|
protected |
Style flags for the dialog.
This by default has FILES_GLOBAL_BOOKMARK set in it. This allows saving bookmarks globally for the user.
Referenced by closeWindow(), Event(), FileDialog(), getDirectory(), init(), newBookmark(), and send().