A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://wxpython.org/Phoenix/docs/html/wx.FileHistory.html below:

wx.FileHistory — wxPython Phoenix 4.2.4a1 documentation

wx.FileHistory¶

The wx.FileHistory encapsulates a user interface convenience, the list of most recently visited files as shown on a menu (usually the File menu).

wx.FileHistory can manage one or more file menus. More than one menu may be required in an MDI application, where the file history should appear on each MDI child menu as well as the MDI parent frame.

See also

Document/View Framework, DocManager

Class Hierarchy¶

Inheritance diagram for class

FileHistory

:

Methods Summary¶

__init__

Constructor.

AddFileToHistory

Adds a file to the file history list, if the object has a pointer to an appropriate file menu.

AddFilesToMenu

Appends the files in the history list, to all menus managed by the file history object.

GetBaseId

Returns the base identifier for the range used for appending items.

GetCount

Returns the number of files currently stored in the file history.

GetHistoryFile

Returns the file at this index (zero-based).

GetMaxFiles

Returns the maximum number of files that can be stored.

GetMenuPathStyle

Get the current style of the menu item labels.

GetMenus

Returns the list of menus that are managed by this file history object.

Load

Loads the file history from the given config object.

RemoveFileFromHistory

Removes the specified file from the history.

RemoveMenu

Removes this menu from the list of those managed by this object.

Save

Saves the file history into the given config object.

SetBaseId

Sets the base identifier for the range used for appending items.

SetMenuPathStyle

Set the style of the menu item labels.

UseMenu

Adds this menu to the list of those menus that are managed by this file history object.

Properties Summary¶ Class API¶
class wx.FileHistory(Object)¶

Possible constructors:

FileHistory(maxFiles=9, idBase=ID_FILE1) -> None

The FileHistory encapsulates a user interface convenience, the list of most recently visited files as shown on a menu (usually the File menu).


Methods¶
__init__(self, maxFiles=9, idBase=ID_FILE1)¶

Constructor.

Pass the maximum number of files that should be stored and displayed.

idBase defaults to wx.ID_FILE1 and represents the id given to the first history menu item. Since menu items can’t share the same ID you should change idBase (to one of your own defined IDs) when using more than one wx.FileHistory in your application.

Parameters:
  • maxFiles (int)

  • idBase (wx.WindowID)

Return type:

None


AddFileToHistory(self, filename)¶

Adds a file to the file history list, if the object has a pointer to an appropriate file menu.

Parameters:

filename (string)

Return type:

None


Overloaded Implementations:

AddFilesToMenu (self)

Appends the files in the history list, to all menus managed by the file history object.

Return type:

None

AddFilesToMenu (self, menu)

Appends the files in the history list, to the given menu only.

Parameters:

menu (wx.Menu)

Return type:

None



GetBaseId(self)¶

Returns the base identifier for the range used for appending items.

Return type:

int


GetCount(self)¶

Returns the number of files currently stored in the file history.

Return type:

int


GetHistoryFile(self, index)¶

Returns the file at this index (zero-based).

Parameters:

index (int)

Return type:

str


GetMaxFiles(self)¶

Returns the maximum number of files that can be stored.

Return type:

int


Get the current style of the menu item labels.

Initially returns FH_PATH_SHOW_IF_DIFFERENT.

Return type:

wx.FileHistoryMenuPathStyle

Added in version 4.1/wxWidgets-3.1.5.


Returns the list of menus that are managed by this file history object.

Return type:

FileHistoryMenuList


Load(self, config)¶

Loads the file history from the given config object.

This function should be called explicitly by the application.

Parameters:

config (wx.ConfigBase)

Return type:

None


RemoveFileFromHistory(self, i)¶

Removes the specified file from the history.

Parameters:

i (int)

Return type:

None


Removes this menu from the list of those managed by this object.

Parameters:

menu (wx.Menu)

Return type:

None


Save(self, config)¶

Saves the file history into the given config object.

This must be called explicitly by the application.

Parameters:

config (wx.ConfigBase)

Return type:

None


SetBaseId(self, baseId)¶

Sets the base identifier for the range used for appending items.

Parameters:

baseId (wx.WindowID)

Return type:

None


Set the style of the menu item labels.

By default, the menu item label style is FH_PATH_SHOW_IF_DIFFERENT.

Parameters:

style (FileHistoryMenuPathStyle)

Return type:

None

Added in version 4.1/wxWidgets-3.1.5.


Adds this menu to the list of those menus that are managed by this file history object.

Also see AddFilesToMenu for initializing the menu with filenames that are already in the history when this function is called, as this is not done automatically.

Parameters:

menu (wx.Menu)

Return type:

None


Properties¶
BaseId¶

See GetBaseId and SetBaseId


Count¶

See GetCount


MaxFiles¶

See GetMaxFiles


See GetMenuPathStyle and SetMenuPathStyle


See GetMenus


RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4