Package gui :: Module filedialog :: Class RelaxFileDialog
[hide private]
[frames] | no frames]

Class RelaxFileDialog

source code


relax specific replacement file dialog for opening and closing files.

This class provides the select() method so that this class can be used with a wx event.

Instance Methods [hide private]
EvtHandler
__init__(self, parent, field=None, message=u'Select a file', defaultDir=u'', defaultFile=u'', wildcard=u'*', style=1, pos=wx.Point(-1, -1))
Setup the class and store the field.
source code
str or list of str
get_file(self)
Return the selected file.
source code
 
select_event(self, event)
The file selector GUI element.
source code

Inherited from wx._windows.FileDialog: GetDirectory, GetFilename, GetFilenames, GetFilterIndex, GetMessage, GetPath, GetPaths, GetWildcard, SetDirectory, SetFilename, SetFilterIndex, SetMessage, SetPath, SetWildcard

Inherited from wx._windows.Dialog: AddMainButtonId, CanDoLayoutAdaptation, Create, CreateButtonSizer, CreateSeparatedButtonSizer, CreateSeparatedSizer, CreateStdDialogButtonSizer, CreateTextSizer, DoLayoutAdaptation, EndModal, GetAffirmativeId, GetContentWindow, GetEscapeId, GetLayoutAdaptationDone, GetLayoutAdaptationLevel, GetLayoutAdaptationMode, GetMainButtonIds, GetModality, GetParentForModalDialog, GetReturnCode, IsMainButtonId, IsModal, SendWindowModalDialogEvent, SetAffirmativeId, SetEscapeId, SetLayoutAdaptationDone, SetLayoutAdaptationLevel, SetLayoutAdaptationMode, SetReturnCode, ShowModal, ShowWindowModal, __enter__, __exit__

Inherited from wx._windows.Dialog (private): _CreateButtonSizer

Inherited from wx._windows.TopLevelWindow: CenterOnScreen, CentreOnScreen, EnableCloseButton, GetDefaultItem, GetIcon, GetTitle, GetTmpDefaultItem, Iconize, IsActive, IsAlwaysMaximized, IsFullScreen, IsIconized, IsMaximized, MacGetMetalAppearance, MacGetTopLevelWindowRef, MacGetUnifiedAppearance, MacSetMetalAppearance, Maximize, OSXIsModified, OSXSetModified, RequestUserAttention, Restore, SetDefaultItem, SetIcon, SetIcons, SetRepresentedFilename, SetShape, SetTitle, SetTmpDefaultItem, ShowFullScreen, ShowWithoutActivating, __repr__

Inherited from wx._core.Window: AcceptsFocus, AcceptsFocusFromKeyboard, AddChild, AdjustForLayoutDirection, AlwaysShowScrollbars, AssociateHandle, CacheBestSize, CanAcceptFocus, CanAcceptFocusFromKeyboard, CanApplyThemeBorder, CanBeOutsideClientArea, CanScroll, CanSetTransparent, CaptureMouse, Center, CenterOnParent, Centre, CentreOnParent, ClearBackground, ClientToScreen, ClientToScreenXY, ClientToWindowSize, Close, ConvertDialogPointToPixels, ConvertDialogSizeToPixels, ConvertPixelPointToDialog, ConvertPixelSizeToDialog, DLG_PNT, DLG_SZE, Destroy, DestroyChildren, Disable, DissociateHandle, DragAcceptFiles, Enable, FindWindowById, FindWindowByLabel, FindWindowByName, Fit, FitInside, Freeze, GetAcceleratorTable, GetAdjustedBestSize, GetAutoLayout, GetBackgroundColour, GetBackgroundStyle, GetBestFittingSize, GetBestSize, GetBestSizeTuple, GetBestVirtualSize, GetBorder, GetCaret, GetCharHeight, GetCharWidth, GetChildren, GetClientAreaOrigin, GetClientRect, GetClientSize, GetClientSizeTuple, GetConstraints, GetContainingSizer, GetCursor, GetDefaultAttributes, GetDropTarget, GetEffectiveMinSize, GetEventHandler, GetExtraStyle, GetFont, GetForegroundColour, GetFullTextExtent, GetGrandParent, GetGtkWidget, GetHandle, GetHelpText, GetHelpTextAtPoint, GetId, GetLabel, GetLayoutDirection, GetMainWindowOfCompositeControl, GetMaxClientSize, GetMaxHeight, GetMaxSize, GetMaxWidth, GetMinClientSize, GetMinHeight, GetMinSize, GetMinWidth, GetName, GetNextSibling, GetParent, GetPopupMenuSelectionFromUser, GetPosition, GetPositionTuple, GetPrevSibling, GetRect, GetScreenPosition, GetScreenPositionTuple, GetScreenRect, GetScrollPos, GetScrollRange, GetScrollThumb, GetSize, GetSizeTuple, GetSizer, GetTextExtent, GetThemeEnabled, GetToolTip, GetToolTipString, GetTopLevelParent, GetUpdateClientRect, GetUpdateRegion, GetValidator, GetVirtualSize, GetVirtualSizeTuple, GetWindowBorderSize, GetWindowStyle, GetWindowStyleFlag, GetWindowVariant, HandleAsNavigationKey, HandleWindowEvent, HasCapture, HasExtraStyle, HasFlag, HasFocus, HasMultiplePages, HasScrollbar, HasTransparentBackground, Hide, HideWithEffect, HitTest, HitTestXY, InformFirstDirection, InheritAttributes, InheritsBackgroundColour, InitDialog, InvalidateBestSize, IsBeingDeleted, IsDoubleBuffered, IsEnabled, IsExposed, IsExposedPoint, IsExposedRect, IsFrozen, IsRetained, IsScrollbarAlwaysShown, IsShown, IsShownOnScreen, IsThisEnabled, IsTopLevel, Layout, LineDown, LineUp, Lower, MakeModal, Move, MoveAfterInTabOrder, MoveBeforeInTabOrder, MoveXY, Navigate, NavigateIn, PageDown, PageUp, PopEventHandler, PopupMenu, PopupMenuXY, PostCreate, PostSizeEvent, PostSizeEventToParent, ProcessWindowEvent, PushEventHandler, Raise, Refresh, RefreshRect, RegisterHotKey, ReleaseMouse, RemoveChild, RemoveEventHandler, Reparent, ScreenToClient, ScreenToClientXY, ScrollLines, ScrollPages, ScrollWindow, SendIdleEvents, SendSizeEvent, SendSizeEventToParent, SetAcceleratorTable, SetAutoLayout, SetBackgroundColour, SetBackgroundStyle, SetBestFittingSize, SetCanFocus, SetCaret, SetClientRect, SetClientSize, SetClientSizeWH, SetConstraints, SetContainingSizer, SetCursor, SetDimensions, SetDoubleBuffered, SetDropTarget, SetEventHandler, SetExtraStyle, SetFocus, SetFocusFromKbd, SetFont, SetForegroundColour, SetHelpText, SetHelpTextForId, SetId, SetInitialSize, SetLabel, SetLayoutDirection, SetMaxClientSize, SetMaxSize, SetMinClientSize, SetMinSize, SetName, SetOwnBackgroundColour, SetOwnFont, SetOwnForegroundColour, SetPosition, SetRect, SetScrollPos, SetScrollbar, SetSize, SetSizeHints, SetSizeHintsSz, SetSizeWH, SetSizer, SetSizerAndFit, SetThemeEnabled, SetToolTip, SetToolTipString, SetTransparent, SetValidator, SetVirtualSize, SetVirtualSizeHints, SetVirtualSizeHintsSz, SetVirtualSizeWH, SetWindowStyle, SetWindowStyleFlag, SetWindowVariant, ShouldInheritColours, Show, ShowWithEffect, Thaw, ToggleWindowStyle, TransferDataFromWindow, TransferDataToWindow, UnregisterHotKey, UnsetToolTip, Update, UpdateWindowUI, UseBgCol, Validate, WarpPointer, WindowToClientSize

Inherited from wx._core.EvtHandler: AddPendingEvent, Bind, Connect, DeletePendingEvents, Disconnect, GetEvtHandlerEnabled, GetNextHandler, GetPreviousHandler, IsUnlinked, ProcessEvent, ProcessEventLocally, ProcessPendingEvents, QueueEvent, SafelyProcessEvent, SetEvtHandlerEnabled, SetNextHandler, SetPreviousHandler, Unbind, Unlink

Inherited from wx._core.EvtHandler (private): _setOORInfo

Inherited from wx._core.Object: GetClassName, IsSameAs

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __setattr__, __sizeof__, __str__, __subclasshook__

Static Methods [hide private]

Inherited from wx._windows.Dialog: EnableLayoutAdaptation, GetClassDefaultAttributes, GetLayoutAdapter, IsLayoutAdaptationEnabled, SetLayoutAdapter

Inherited from wx._windows.TopLevelWindow: GetDefaultSize

Inherited from wx._core.Window: FindFocus, GetCapture, NewControlId, ReleaseControlId, UnreserveControlId

Properties [hide private]

Inherited from wx._windows.FileDialog: Directory, Filename, Filenames, FilterIndex, Message, Path, Paths, Wildcard, thisown

Inherited from wx._windows.Dialog: AffirmativeId, EscapeId, ReturnCode

Inherited from wx._windows.TopLevelWindow: DefaultItem, Icon, OSXModified, Title, TmpDefaultItem

Inherited from wx._core.Window: AcceleratorTable, AutoLayout, BackgroundColour, BackgroundStyle, BestSize, BestVirtualSize, Border, Caret, CharHeight, CharWidth, Children, ClientAreaOrigin, ClientRect, ClientSize, Constraints, ContainingSizer, Cursor, DefaultAttributes, DropTarget, EffectiveMinSize, Enabled, EventHandler, ExtraStyle, Font, ForegroundColour, GrandParent, GtkWidget, Handle, HelpText, Id, Label, LayoutDirection, MaxClientSize, MaxHeight, MaxSize, MaxWidth, MinClientSize, MinHeight, MinSize, MinWidth, Name, Parent, Position, Rect, ScreenPosition, ScreenRect, Shown, Size, Sizer, ThemeEnabled, ToolTip, ToolTipString, TopLevel, TopLevelParent, UpdateClientRect, UpdateRegion, Validator, VirtualSize, WindowStyle, WindowStyleFlag, WindowVariant

Inherited from wx._core.EvtHandler: EvtHandlerEnabled, NextHandler, PreviousHandler

Inherited from wx._core.Object: ClassName

Inherited from object: __class__

Method Details [hide private]

__init__(self, parent, field=None, message=u'Select a file', defaultDir=u'', defaultFile=u'', wildcard=u'*', style=1, pos=wx.Point(-1, -1))
(Constructor)

source code 

Setup the class and store the field.

Parameters:
  • parent (Window) - The parent wx window object.
  • field (wx object or None) - The field to update with the file selection.
  • message (String) - The file selector prompt string.
  • defaultDir (String) - The directory to open in.
  • defaultFile (String) - The file to default selection to.
  • wildcard (String) - The file wildcard pattern. For example for opening PDB files, this could be "PDB files (*.pdb)|*.pdb;*.PDB".
  • style (long) - The dialog style. To open a single file, set to wx.FD_OPEN. To open multiple files, set to wx.FD_OPEN|wx.FD_MULTIPLE. To save a single file, set to wx.FD_SAVE. To save multiple files, set to wx.FD_SAVE|wx.FD_MULTIPLE.
  • pos (Point) - The window position.
Returns: EvtHandler
Overrides: object.__init__

get_file(self)

source code 

Return the selected file.

Returns: str or list of str
The name of the selected file(s).

select_event(self, event)

source code 

The file selector GUI element.

Parameters:
  • event (wx event) - The wx event.