Classes | |
class | UIContextNotification |
Interface used to receive notifications related to files and contexts. More... | |
class | UIContextHandler |
class | UIContext |
Functions | |
void | InitUIViews () |
void | InitUIActions () |
void | InitUIPlugins () |
void | SetCurrentUIPluginLoadOrder (BNPluginLoadOrder order) |
void | AddRequiredUIPluginDependency (const std::string &name) |
void | AddOptionalUIPluginDependency (const std::string &name) |
class UIContextNotification |
Interface used to receive notifications related to files and contexts.
Many notifications include the ability to modify the behavior of the context.
Public Member Functions | |
virtual | ~UIContextNotification () |
virtual void | OnContextOpen (UIContext *context) |
Callback after a UIContext is opened (eg MainWindow) More... | |
virtual void | OnContextClose (UIContext *context) |
Callback right before closing a UIContext. More... | |
virtual bool | OnBeforeOpenDatabase (UIContext *context, FileMetadataRef metadata) |
Callback before a database (specifically a database, not a raw file) is opened. More... | |
virtual bool | OnAfterOpenDatabase (UIContext *context, FileMetadataRef metadata, BinaryViewRef data) |
Callback after a database (specifically a database, not a raw file) is opened. More... | |
virtual bool | OnBeforeOpenFile (UIContext *context, FileContext *file) |
Callback before a file (raw or database) is opened (after OnAfterOpenDatabase if opening a database) More... | |
virtual void | OnAfterOpenFile (UIContext *context, FileContext *file, ViewFrame *frame) |
Callback after a file (raw or database) is opened. More... | |
virtual bool | OnBeforeSaveFile (UIContext *context, FileContext *file, ViewFrame *frame) |
Callback before a file is saved (either as a database or raw) More... | |
virtual void | OnAfterSaveFile (UIContext *context, FileContext *file, ViewFrame *frame) |
Callback after a file is saved (either as a database or raw) More... | |
virtual bool | OnBeforeCloseFile (UIContext *context, FileContext *file, ViewFrame *frame) |
Callback before a file is closed. More... | |
virtual void | OnAfterCloseFile (UIContext *context, FileContext *file, ViewFrame *frame) |
Callback after a file is closed. More... | |
virtual void | OnViewChange (UIContext *context, ViewFrame *frame, const QString &type) |
Callback when the ui changes views. More... | |
virtual void | OnAddressChange (UIContext *context, ViewFrame *frame, View *view, const ViewLocation &location) |
Callback when the ui changes address. More... | |
virtual bool | GetNameForFile (UIContext *context, FileContext *file, QString &name) |
Callback to modify the displayed file name for a FileContext (eg in the window title or tab title) Note: Due to the out param &name, this is not usable from Python with PySide. More... | |
virtual bool | GetNameForPath (UIContext *context, const QString &path, QString &name) |
Callback to modify the displayed file name for a file path (eg in the new tab widget) Note: Due to the out param &name, this is not usable from Python with PySide. More... | |
virtual void | OnNewSelectionForXref (UIContext *context, ViewFrame *frame, View *view, const SelectionInfoForXref &selection) |
Callback when the ui changes selection and should update cross references. More... | |
|
virtual |
|
inlinevirtual |
Callback after a UIContext is opened (eg MainWindow)
context | Opened context |
|
inlinevirtual |
Callback right before closing a UIContext.
context | Closing context |
|
inlinevirtual |
Callback before a database (specifically a database, not a raw file) is opened.
context | Context opening the database |
metadata | Object with info about the database file |
|
inlinevirtual |
Callback after a database (specifically a database, not a raw file) is opened.
context | Context which opened the database |
metadata | Object with info about the database file |
data | Raw data which is backed by the database |
|
inlinevirtual |
Callback before a file (raw or database) is opened (after OnAfterOpenDatabase if opening a database)
context | Context opening the file |
file | Context with the file and ui views |
|
inlinevirtual |
Callback after a file (raw or database) is opened.
context | Context which opened the file |
file | Context with the file and ui views |
frame | ViewFrame constructed to display the file |
|
inlinevirtual |
Callback before a file is saved (either as a database or raw)
context | Context which is saving the file |
file | Context with the file and ui views |
frame | ViewFrame for the file |
|
inlinevirtual |
Callback after a file is saved (either as a database or raw)
context | Context which saved the file |
file | Context with the file and ui views |
frame | ViewFrame for the file |
|
inlinevirtual |
Callback before a file is closed.
context | Context which is closing the file |
file | Context with the file and ui views |
frame | ViewFrame for the file |
|
inlinevirtual |
Callback after a file is closed.
context | Context which closed the file |
file | Context with the file and ui views |
frame | ViewFrame which former showed the file (will be deleted after this) |
|
inlinevirtual |
|
inlinevirtual |
Callback to modify the displayed file name for a FileContext (eg in the window title or tab title) Note: Due to the out param &name, this is not usable from Python with PySide.
context | Context which will display this name |
file | File whose name to get |
name | [Out] Name to be displayed |
|
inlinevirtual |
Callback to modify the displayed file name for a file path (eg in the new tab widget) Note: Due to the out param &name, this is not usable from Python with PySide.
context | Context which will display this name |
path | Path to file whose name to get |
name | [Out] Name to be displayed |
|
inlinevirtual |
Callback when the ui changes selection and should update cross references.
context | Context changing selection |
frame | ViewFrame which changed selection |
view | View that changed selection |
selection | New selection |
Reimplemented in CrossReferenceWidget.
class UIContextHandler |
Public Member Functions | |
virtual | ~UIContextHandler () |
virtual void | updateStatus ()=0 |
virtual void | notifyThemeChanged ()=0 |
virtual void | registerFileOpenMode (const QString &buttonName, const QString &description, const QString &action) |
|
virtual |
|
pure virtual |
|
pure virtual |
|
virtual |
class UIContext |
Public Member Functions | |
UIContext () | |
virtual | ~UIContext () |
virtual QMainWindow * | mainWindow ()=0 |
virtual void | releaseBinaryView (BinaryViewRef view) |
virtual void | viewChanged (ViewFrame *frame, const QString &type) |
virtual bool | navigateForBinaryView (BinaryViewRef view, uint64_t addr) |
virtual bool | navigateToType (const std::string &name, uint64_t offset=0)=0 |
Navigate to a named type in the context, optionally at a member offset. More... | |
virtual std::vector< std::pair< BinaryViewRef, QString > > | getAvailableBinaryViews ()=0 |
Get a list of all opened binary views, and their names. More... | |
virtual QWidget * | getTabForSessionId (uint64_t sessionId)=0 |
Gets the tab for for a given sessionId. More... | |
virtual QString | getTabNameForSessionId (uint64_t sessionId)=0 |
Gets the name of a tab for the given session. More... | |
virtual View * | getCurrentView ()=0 |
Get the currently visible View for the currently visible ViewFrame (if it exists) More... | |
virtual ViewFrame * | getCurrentViewFrame ()=0 |
Get the currently visible ViewFrame (if it exists) More... | |
virtual UIActionHandler * | getCurrentActionHandler ()=0 |
Get the current Action Handler for the focused widget. More... | |
virtual void | createTabForWidget (const QString &name, QWidget *widget)=0 |
Open a tab containing the given widget with the given name. More... | |
virtual void | splitToNewWindowAndNavigateToLocation (uint64_t location)=0 |
Open a new window with the same file context and Navigate to a given location. More... | |
virtual void | splitToNewTabAndNavigateToLocation (uint64_t location)=0 |
Open a new tab with the same file context and Navigate to a given location. More... | |
virtual void | openPane (Pane *pane, Qt::Orientation primaryDirection=Qt::Vertical)=0 |
Open a new pane in the active tab. More... | |
virtual QList< QWidget * > | getTabs ()=0 |
Get a list of all tabs as QWidgets. More... | |
virtual QWidget * | getTabForName (const QString &name)=0 |
Get the QWidget responsible for the tab with the given name. More... | |
virtual QWidget * | getTabForFile (FileContext *file)=0 |
Get the QWidget responsible for the tab with the given file. More... | |
virtual QString | getNameForTab (QWidget *tab)=0 |
Get the name of the tab with the given QWidget. More... | |
virtual void | activateTab (QWidget *tab)=0 |
Activate and make visible the tab with the given QWidget. More... | |
virtual void | closeTab (QWidget *tab, bool closeWindowIfLast=false)=0 |
Close the tab with the given QWidget. More... | |
virtual QWidget * | getCurrentTab ()=0 |
Get the QWidget in the currently open tab. More... | |
virtual QWidget * | createNewTab (bool focus=true)=0 |
virtual View * | getViewForTab (QWidget *tab)=0 |
Get the current View associated with the given QWidget, if it exists. More... | |
virtual ViewFrame * | getViewFrameForTab (QWidget *tab) const =0 |
Get the active ViewFrame associated with the given QWidget, if it exists. More... | |
virtual std::vector< ViewFrame * > | getAllViewFramesForTab (QWidget *tab) const =0 |
Get all ViewFrame instances associated with the given QWidget, if they exist. More... | |
virtual bool | openFilename (const QString &path, bool openOptions=false) |
virtual ViewFrame * | openFileContext (FileContext *file, const QString &forcedView="", bool addTab=true) |
virtual void | recreateViewFrames (FileContext *file)=0 |
UIActionHandler * | globalActions () |
virtual UIActionHandler * | contentActionHandler ()=0 |
virtual Sidebar * | sidebar ()=0 |
virtual GlobalArea * | globalArea ()=0 |
void | updateCrossReferences (ViewFrame *frame, View *view, const SelectionInfoForXref &selection) |
QString | GetNameForFile (FileContext *file) |
Get the displayed name for a given file. More... | |
QString | GetNameForPath (const QString &path) |
Get the displayed name for a path to a file. More... | |
virtual QWidget * | fileContentsLockStatusWidget ()=0 |
Static Public Member Functions | |
static void | registerNotification (UIContextNotification *notification) |
Register an object to receive notifications of UIContext events. More... | |
static void | unregisterNotification (UIContextNotification *notification) |
Unregister an object from receiving notifications of UIContext events. More... | |
static void | setHandler (UIContextHandler *handler) |
static QSize | getScaledWindowSize (int x, int y) |
static void | updateStatus () |
static void | notifyThemeChanged () |
static void | showPreview (QWidget *parent, PreviewWidget *preview, QPoint localPos, bool anchorAtPoint=false) |
static void | closePreview () |
static bool | sendPreviewWheelEvent (QWheelEvent *event) |
static void | closeOtherActiveModalWidget (QWidget *current) |
static void | registerFileOpenMode (const QString &buttonName, const QString &description, const QString &action) |
static UIContext * | contextForWidget (QWidget *widget) |
static UIContext * | activeContext () |
static std::set< UIContext * > | allContexts () |
static QWidget * | topLevelAt (const QPoint &pt, QWidget *ignoreWidget=nullptr) |
static QRect | placeNewTopLevelWindow (QScreen *screen, const QPoint &pos, QWidget *existingWidget) |
static ViewFrame * | currentViewFrameForWidget (QWidget *widget) |
Protected Member Functions | |
void | setupUIContext (QWidget *obj) |
void | NotifyOnContextOpen () |
void | NotifyOnContextClose () |
bool | NotifyOnBeforeOpenDatabase (FileMetadataRef metadata) |
bool | NotifyOnAfterOpenDatabase (FileMetadataRef metadata, BinaryViewRef data) |
bool | NotifyOnBeforeOpenFile (FileContext *file) |
void | NotifyOnAfterOpenFile (FileContext *file, ViewFrame *frame) |
bool | NotifyOnBeforeSaveFile (FileContext *file, ViewFrame *frame) |
void | NotifyOnAfterSaveFile (FileContext *file, ViewFrame *frame) |
bool | NotifyOnBeforeCloseFile (FileContext *file, ViewFrame *frame) |
void | NotifyOnAfterCloseFile (FileContext *file, ViewFrame *frame) |
void | NotifyOnViewChange (ViewFrame *frame, const QString &type) |
void | NotifyOnAddressChange (ViewFrame *frame, View *view, const ViewLocation &location) |
void | NotifyOnNewSelectionForXref (ViewFrame *frame, View *view, const SelectionInfoForXref &selection) |
UIContext::UIContext | ( | ) |
|
virtual |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
pure virtual |
|
virtual |
|
virtual |
|
virtual |
|
pure virtual |
Navigate to a named type in the context, optionally at a member offset.
name | Name of type to which to navigate |
offset | Offset of member in type to which to navigate |
|
pure virtual |
Get a list of all opened binary views, and their names.
|
pure virtual |
Gets the tab for for a given sessionId.
|
pure virtual |
Gets the name of a tab for the given session.
|
pure virtual |
|
pure virtual |
|
pure virtual |
Get the current Action Handler for the focused widget.
|
pure virtual |
Open a tab containing the given widget with the given name.
name | Name for tab |
widget | Widget to display in the tab (optionally a ViewFrame) |
|
pure virtual |
Open a new window with the same file context and Navigate to a given location.
location |
|
pure virtual |
Open a new tab with the same file context and Navigate to a given location.
location |
|
pure virtual |
Open a new pane in the active tab.
pane | Pane widget to open |
primaryDirection | Primary axis for content in pane (determines default split direction) |
|
pure virtual |
Get a list of all tabs as QWidgets.
|
pure virtual |
Get the QWidget responsible for the tab with the given name.
name | Name of tab to get |
|
pure virtual |
Get the QWidget responsible for the tab with the given file.
file | File of tab to get |
|
pure virtual |
Get the name of the tab with the given QWidget.
tab | QWidget which is in a tab |
|
pure virtual |
Activate and make visible the tab with the given QWidget.
tab | QWidget which is in a tab |
|
pure virtual |
Close the tab with the given QWidget.
tab | QWidget which is in a tab |
closeWindowIfLast | If false, displays the new tab page if the widget was the last tab |
|
pure virtual |
Get the QWidget in the currently open tab.
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
pure virtual |
|
virtual |
|
virtual |
|
pure virtual |
|
inline |
|
pure virtual |
|
pure virtual |
|
pure virtual |
void UIContext::updateCrossReferences | ( | ViewFrame * | frame, |
View * | view, | ||
const SelectionInfoForXref & | selection | ||
) |
|
static |
Register an object to receive notifications of UIContext events.
notification | Object which will receive notifications |
|
static |
Unregister an object from receiving notifications of UIContext events.
notification | Object which will no longer receive notifications |
QString UIContext::GetNameForFile | ( | FileContext * | file | ) |
Get the displayed name for a given file.
file | File whose displayed name to get |
QString UIContext::GetNameForPath | ( | const QString & | path | ) |
Get the displayed name for a path to a file.
path | Path to file whose displayed name you want |
|
pure virtual |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
|
static |
void InitUIViews | ( | ) |
void InitUIActions | ( | ) |
void InitUIPlugins | ( | ) |
void SetCurrentUIPluginLoadOrder | ( | BNPluginLoadOrder | order | ) |
void AddRequiredUIPluginDependency | ( | const std::string & | name | ) |
void AddOptionalUIPluginDependency | ( | const std::string & | name | ) |