FileDialog

File open / save dialog

class FileDialog : Dialog , CustomGridCellAdapter {}

Constructors

this
this(UIString caption, Window parent, Action action, uint fileDialogFlags)
Undocumented in source.

Members

Functions

addFilter
void addFilter(FileFilterEntry value)

add new filter entry

autofitGrid
void autofitGrid()
Undocumented in source. Be warned that the author may not have intended to support it.
createAndEnterDirectory
void createAndEnterDirectory(string name)
Undocumented in source. Be warned that the author may not have intended to support it.
createRootsList
ListWidget createRootsList()
Undocumented in source. Be warned that the author may not have intended to support it.
drawCell
void drawCell(DrawBuf buf, Rect rc, int col, int row)

draw data cell content

getCellPopupMenu
MenuItem getCellPopupMenu(GridWidgetBase source, int col, int row)
Undocumented in source. Be warned that the author may not have intended to support it.
handleAction
bool handleAction(Action action)

Custom handling of actions

initialize
void initialize()

override to implement creation of dialog controls

isCustomCell
bool isCustomCell(int col, int row)

return true for custom drawn cell

layout
void layout(Rect rc)

Set widget rectangle to specified value and layout widget contents. (Step 2 of two phase layout).

locateFileInList
void locateFileInList(dstring pattern)
Undocumented in source. Be warned that the author may not have intended to support it.
measureCell
Point measureCell(int col, int row)

return cell size

onItemActivated
void onItemActivated(int index)

file list item activated (double clicked or Enter key pressed)

onItemSelected
void onItemSelected(int index)

file list item selected

onKeyEvent
bool onKeyEvent(KeyEvent event)
Undocumented in source. Be warned that the author may not have intended to support it.
onPathSelected
bool onPathSelected(string path)
Undocumented in source. Be warned that the author may not have intended to support it.
onShow
void onShow()

// Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

openDirectory
bool openDirectory(string dir, string selectedItemPath)
Undocumented in source. Be warned that the author may not have intended to support it.
reopenDirectory
bool reopenDirectory()
Undocumented in source. Be warned that the author may not have intended to support it.
rowIcon
DrawableRef rowIcon(int row)
Undocumented in source. Be warned that the author may not have intended to support it.
upLevel
bool upLevel()
Undocumented in source. Be warned that the author may not have intended to support it.

Properties

allowMultipleFiles
bool allowMultipleFiles [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
allowMultipleFiles
bool allowMultipleFiles [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
executableFilterSelected
bool executableFilterSelected [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
filename
string filename [@property getter]

the name of the file or directory that is currently selected

filename
string filename [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
filenames
string[] filenames [@property getter]

all the selected filenames

filetypeIcons
string[string] filetypeIcons [@property getter]

mapping of file extension to icon resource name, e.g. ".txt": "text-plain"

filterIndex
int filterIndex [@property getter]

filter index

filterIndex
int filterIndex [@property setter]

filter index

filters
FileFilterEntry[] filters [@property getter]

filter list for file type filter combo box

filters
FileFilterEntry[] filters [@property setter]

filter list for file type filter combo box

path
string path [@property getter]

the path to the directory whose files should be displayed

path
string path [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.
selectedFilter
string[] selectedFilter [@property getter]

return currently selected filter value - array of patterns like ["*.txt", "*.rtf"]

showHiddenFiles
bool showHiddenFiles [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
showHiddenFiles
bool showHiddenFiles [@property setter]
Undocumented in source. Be warned that the author may not have intended to support it.

Variables

_action
Action _action;
Undocumented in source.
_allowMultipleFiles
bool _allowMultipleFiles;
Undocumented in source.
_cbFilters
ComboBox _cbFilters;
Undocumented in source.
_edFilename
EditLine _edFilename;
Undocumented in source.
_edPath
FilePathPanel _edPath;
Undocumented in source.
_entries
DirEntry[] _entries;
Undocumented in source.
_fileList
StringGridWidget _fileList;
Undocumented in source.
_filename
string _filename;
Undocumented in source.
_filetypeIcons
string[string] _filetypeIcons;
Undocumented in source.
_filterIndex
int _filterIndex;
Undocumented in source.
_filters
FileFilterEntry[] _filters;
Undocumented in source.
_isOpenDialog
bool _isOpenDialog;
Undocumented in source.
_isRoot
bool _isRoot;
Undocumented in source.
_path
string _path;
Undocumented in source.
_roots
RootEntry[] _roots;
Undocumented in source.
_shortcutHelper
TextTypingShortcutHelper _shortcutHelper;
Undocumented in source.
_showHiddenFiles
bool _showHiddenFiles;
Undocumented in source.
leftPanel
Widget leftPanel;
Undocumented in source.
rightPanel
VerticalLayout rightPanel;
Undocumented in source.

Inherited Members

From Dialog

_window
Window _window;
Undocumented in source.
_parentWindow
Window _parentWindow;
Undocumented in source.
_popup
PopupWidget _popup;
Undocumented in source.
_caption
UIString _caption;
Undocumented in source.
_flags
uint _flags;
Undocumented in source.
_icon
string _icon;
Undocumented in source.
_initialWidth
int _initialWidth;
Undocumented in source.
_initialHeight
int _initialHeight;
Undocumented in source.
dialogResult
Signal!DialogResultHandler dialogResult;
Undocumented in source.
measure
void measure(int parentWidth, int parentHeight)

Measure widget according to desired width and height constraints. (Step 1 of two phase layout).

windowIcon
string windowIcon [@property getter]

get icon resource id

windowIcon
string windowIcon [@property setter]

set icon resource id

windowCaption
UIString windowCaption [@property getter]
Undocumented in source. Be warned that the author may not have intended to support it.
windowCaption
dstring windowCaption [@property setter]

set window caption

windowCaption
UIString windowCaption [@property setter]

get window caption

_buttonActions
const(Action)[] _buttonActions;
Undocumented in source.
_defaultButton
ImageTextButton _defaultButton;
Undocumented in source.
_cancelButton
ImageTextButton _cancelButton;
Undocumented in source.
createButtonsPanel
Widget createButtonsPanel(const(Action)[] actions, int defaultActionIndex, int splitBeforeIndex)

create panel with buttons based on list of actions

findKeyAction
Action findKeyAction(uint keyCode, uint flags)

map key to action

handleAction
bool handleAction(Action action)

Custom handling of actions

initialize
void initialize()

override to implement creation of dialog controls

close
void close(Action action)

Notify about dialog result, and then close dialog.

show
void show()

shows dialog

onShow
void onShow()

called after window with dialog is shown

From CustomGridCellAdapter

isCustomCell
bool isCustomCell(int col, int row)

return true for custom drawn cell

measureCell
Point measureCell(int col, int row)

return cell size

drawCell
void drawCell(DrawBuf buf, Rect rc, int col, int row)

draw data cell content

Meta