17 from wx.lib.agw
import customtreectrl
18 from wx.lib.agw.aui
import GetManager
20 from ..controller.project
import Project
21 from ..pluginapi
import Plugin
22 from ..pluginapi.plugin
import ActionInfo
28 defaults = {
"opened":
True,
32 def __init__(self, application, controller=None):
33 Plugin.__init__(self, application, default_settings=self.
defaultsdefaults)
34 self.
settingssettings = application.settings._config_obj[
'Plugins'][
'File Explorer']
35 self.
_parent_parent = wx.App.Get().GetTopWindow()
37 self.
_filemgr_filemgr.SetThemeEnabled(
True)
45 if self.
_mgr_mgr.GetPane(
"file_manager")
in self.
_mgr_mgr._panes:
46 register = self.
_mgr_mgr.InsertPane
48 register = self.
_mgr_mgr.AddPane
50 register(self.
_filemgr_filemgr, wx.lib.agw.aui.AuiPaneInfo().Name(
"file_manager").
51 Caption(
"Files").LeftDockable(
True).CloseButton(
True))
53 self.
_mgr_mgr.Update()
58 doc=
'Show File Explorer panel',
67 self.
_mgr_mgr.Update()
77 return self.
_filemgr_filemgr.HasFocus()
81 self.
_parent_parent = wx.App.Get().GetWindow()
86 HTML_BACKGROUND = self.
settingssettings.get(
'background help', (240, 242, 80))
87 HTML_FOREGROUND = self.
settingssettings.get(
'foreground text', (7, 0, 70))
88 HTML_FONT_FACE = self.
settingssettings.get(
'font face',
'')
89 HTML_FONT_SIZE = self.
settingssettings.get(
'font size', 11)
92 self.
_filemgr_filemgr.SetMinSize(wx.Size(200, 225))
95 wx.lib.agw.aui.AuiPaneInfo().Name(
"file_manager").
96 Caption(
"Files").LeftDockable(
True).
98 self.
_filemgr_filemgr.SetBackgroundStyle(wx.BG_STYLE_SYSTEM)
99 self.
_filemgr_filemgr.SetBackgroundColour(HTML_BACKGROUND)
100 self.
_filemgr_filemgr.SetForegroundColour(HTML_FOREGROUND)
102 self.
fontfont.SetFaceName(HTML_FONT_FACE)
103 self.
fontfont.SetPointSize(HTML_FONT_SIZE)
106 self.
_filetreectrl_filetreectrl.SetBackgroundColour(HTML_BACKGROUND)
107 self.
_filetreectrl_filetreectrl.SetForegroundColour(HTML_FOREGROUND)
111 self.
_mgr_mgr.Update()
124 wx.GenericDirCtrl.__init__(self, parent, id=-1, size=(200, 225), style=wx.DIRCTRL_3D_INTERNAL)
126 self.SetThemeEnabled(
True)
130 if isinstance(self.
_controller_controller, Project):
132 self.SelectPath(self.
_controller_controller.data.source)
134 self.ExpandPath(self.
_controller_controller.data.source)
Used to create menu entries, keyboard shortcuts and/or toolbar buttons.
Entry point to RIDE plugin API – all plugins must extend this class.
def get_selected_datafile(self)
Returns the data file that is currently selected in the tree.
def unsubscribe_all(self)
Stops to listen to all messages this plugin has subscribed to.
def register_action(self, action_info)
Registers a menu entry and optionally a shortcut and a toolbar icon.
def unregister_actions(self)
Unregisters all actions registered by this plugin.
def save_setting(self, name, value, override=True, delay=0)
Saves the specified setting into the RIDE configuration file.
Provides a tree view for Files and Folders.
def __init__(self, application, controller=None)
def disable(self)
Called by RIDE when the plugin is disabled.
def register_frame(self, parent=None)
def enable(self)
This method is called by RIDE when the plugin is enabled.
def OnShowFileExplorer(self, event)
def __init__(self, parent, controller=None)