Loading...
Searching...
No Matches
ScriptingConsole

Detailed Description

Classes

class  GlobalAreaCompatibilitySidebarWidgetType
 
class  ScriptingCompletionModel
 
class  ScriptingCompletionPopup
 
class  ScriptingConsoleEdit
 
class  ScriptingConsoleOutput
 
class  ScriptingConsole
 
class  ScriptingConsoleSidebarWidgetType
 

Class Documentation

◆ GlobalAreaCompatibilitySidebarWidgetType

class GlobalAreaCompatibilitySidebarWidgetType

Public Member Functions

 GlobalAreaCompatibilitySidebarWidgetType ()
 
SidebarWidgetLocation defaultLocation () const override
 
SidebarContextSensitivity contextSensitivity () const override
 
bool alwaysShowTabs () const override
 
bool hideIfNoContent () const override
 
- Public Member Functions inherited from SidebarWidgetType
 SidebarWidgetType (const QImage &icon, const QString &name)
 
virtual ~SidebarWidgetType ()
 
const SidebarIconicon () const
 
const QString & name () const
 
virtual bool isInReferenceArea () const
 
virtual bool viewSensitive () const
 
virtual SidebarWidgetcreateWidget (ViewFrame *, BinaryViewRef)
 
virtual SidebarWidgetcreateInvalidContextWidget ()
 
virtual QWidget * headerWidget (SplitPaneWidget *, ViewFrame *, BinaryViewRef)
 
virtual bool focusHeaderWidget () const
 
virtual QString noWidgetMessage () const
 
virtual DockableTabStyletabStyle () const
 
virtual bool canUseAsPane (SplitPaneWidget *, BinaryViewRef) const
 
virtual PanecreatePane (SplitPaneWidget *, BinaryViewRef)
 
void updateTheme ()
 

Constructor & Destructor Documentation

◆ GlobalAreaCompatibilitySidebarWidgetType()

GlobalAreaCompatibilitySidebarWidgetType::GlobalAreaCompatibilitySidebarWidgetType ( )

Member Function Documentation

◆ defaultLocation()

SidebarWidgetLocation GlobalAreaCompatibilitySidebarWidgetType::defaultLocation ( ) const
inlineoverridevirtual

Reimplemented from SidebarWidgetType.

◆ contextSensitivity()

SidebarContextSensitivity GlobalAreaCompatibilitySidebarWidgetType::contextSensitivity ( ) const
inlineoverridevirtual

Reimplemented from SidebarWidgetType.

◆ alwaysShowTabs()

bool GlobalAreaCompatibilitySidebarWidgetType::alwaysShowTabs ( ) const
inlineoverridevirtual

Reimplemented from SidebarWidgetType.

◆ hideIfNoContent()

bool GlobalAreaCompatibilitySidebarWidgetType::hideIfNoContent ( ) const
inlineoverridevirtual

Reimplemented from SidebarWidgetType.

◆ ScriptingCompletionModel

class ScriptingCompletionModel

Public Member Functions

 ScriptingCompletionModel (QWidget *parent)
 
virtual QModelIndex index (int row, int col, const QModelIndex &parent=QModelIndex()) const override
 
virtual QModelIndex parent (const QModelIndex &i) const override
 
virtual bool hasChildren (const QModelIndex &parent) const override
 
virtual int rowCount (const QModelIndex &parent=QModelIndex()) const override
 
virtual int columnCount (const QModelIndex &parent) const override
 
virtual QVariant data (const QModelIndex &i, int role) const override
 
void setModelData (const std::vector< std::string > &completions, bool searching)
 

Constructor & Destructor Documentation

◆ ScriptingCompletionModel()

ScriptingCompletionModel::ScriptingCompletionModel ( QWidget * parent)

Member Function Documentation

◆ index()

virtual QModelIndex ScriptingCompletionModel::index ( int row,
int col,
const QModelIndex & parent = QModelIndex() ) const
overridevirtual

◆ parent()

virtual QModelIndex ScriptingCompletionModel::parent ( const QModelIndex & i) const
overridevirtual

◆ hasChildren()

virtual bool ScriptingCompletionModel::hasChildren ( const QModelIndex & parent) const
overridevirtual

◆ rowCount()

virtual int ScriptingCompletionModel::rowCount ( const QModelIndex & parent = QModelIndex()) const
overridevirtual

◆ columnCount()

virtual int ScriptingCompletionModel::columnCount ( const QModelIndex & parent) const
overridevirtual

◆ data()

virtual QVariant ScriptingCompletionModel::data ( const QModelIndex & i,
int role ) const
overridevirtual

◆ setModelData()

void ScriptingCompletionModel::setModelData ( const std::vector< std::string > & completions,
bool searching )

◆ ScriptingCompletionPopup

class ScriptingCompletionPopup

Signals

void complete (QString text)
 

Public Member Functions

 ScriptingCompletionPopup (QWidget *parent)
 
void showWithData (QPoint pt, int cursorSize, const std::vector< std::string > &completions, bool searching=false)
 
bool handleKeyEvent (QKeyEvent *event)
 
virtual ~ScriptingCompletionPopup ()
 

Protected Member Functions

virtual bool eventFilter (QObject *obj, QEvent *event) override
 

Constructor & Destructor Documentation

◆ ScriptingCompletionPopup()

ScriptingCompletionPopup::ScriptingCompletionPopup ( QWidget * parent)

◆ ~ScriptingCompletionPopup()

virtual ScriptingCompletionPopup::~ScriptingCompletionPopup ( )
virtual

Member Function Documentation

◆ eventFilter()

virtual bool ScriptingCompletionPopup::eventFilter ( QObject * obj,
QEvent * event )
overrideprotectedvirtual

◆ showWithData()

void ScriptingCompletionPopup::showWithData ( QPoint pt,
int cursorSize,
const std::vector< std::string > & completions,
bool searching = false )

◆ handleKeyEvent()

bool ScriptingCompletionPopup::handleKeyEvent ( QKeyEvent * event)

◆ complete

void ScriptingCompletionPopup::complete ( QString text)
signal

◆ ScriptingConsoleEdit

class ScriptingConsoleEdit

Public Types

typedef std::function< std::vector< std::string >(const std::string &)> CompletionCallback
 

Public Member Functions

 ScriptingConsoleEdit (ScriptingConsole *parent)
 
void setCharHeight (int height)
 
void setContinuation (bool cont)
 
void setCompletionCallback (CompletionCallback callback)
 
void insertFromMimeData (const QMimeData *source) override
 

Protected Member Functions

virtual void keyPressEvent (QKeyEvent *event) override
 

Member Typedef Documentation

◆ CompletionCallback

std::function<std::vector<std::string>(const std::string&)> ScriptingConsoleEdit::CompletionCallback

Constructor & Destructor Documentation

◆ ScriptingConsoleEdit()

ScriptingConsoleEdit::ScriptingConsoleEdit ( ScriptingConsole * parent)

Member Function Documentation

◆ setCharHeight()

void ScriptingConsoleEdit::setCharHeight ( int height)

◆ setContinuation()

void ScriptingConsoleEdit::setContinuation ( bool cont)

◆ setCompletionCallback()

void ScriptingConsoleEdit::setCompletionCallback ( CompletionCallback callback)
inline

◆ insertFromMimeData()

void ScriptingConsoleEdit::insertFromMimeData ( const QMimeData * source)
override

◆ keyPressEvent()

virtual void ScriptingConsoleEdit::keyPressEvent ( QKeyEvent * event)
overrideprotectedvirtual

◆ ScriptingConsoleOutput

class ScriptingConsoleOutput

Public Slots

virtual void mouseReleaseEvent (QMouseEvent *event) override
 
void viewChanged (QWidget *frame)
 

Public Member Functions

 ScriptingConsoleOutput (ScriptingConsole *parent, Menu *menu)
 
bool IsNavigable (const QString &str, const std::pair< int, int > &offsetLen, uint64_t &value, bool highlight) const
 

Protected Member Functions

void contextMenuEvent (QContextMenuEvent *event) override
 

Constructor & Destructor Documentation

◆ ScriptingConsoleOutput()

ScriptingConsoleOutput::ScriptingConsoleOutput ( ScriptingConsole * parent,
Menu * menu )

Member Function Documentation

◆ IsNavigable()

bool ScriptingConsoleOutput::IsNavigable ( const QString & str,
const std::pair< int, int > & offsetLen,
uint64_t & value,
bool highlight ) const

◆ contextMenuEvent()

void ScriptingConsoleOutput::contextMenuEvent ( QContextMenuEvent * event)
overrideprotected

◆ mouseReleaseEvent

virtual void ScriptingConsoleOutput::mouseReleaseEvent ( QMouseEvent * event)
overridevirtualslot

◆ viewChanged

void ScriptingConsoleOutput::viewChanged ( QWidget * frame)
slot

◆ ScriptingConsole

class ScriptingConsole

Signals

void viewChanged (QWidget *frame)
 
void onScriptExecution ()
 
void onScriptCompletion ()
 

Public Member Functions

 ScriptingConsole (QWidget *parent, const QString &providerName, const QString &instanceName, ScriptingInstanceRef instance)
 
virtual ~ScriptingConsole ()
 
QString getProviderName () const
 
QString getInstanceName () const
 
ScriptingInstanceRef getInstance ()
 
bool getScriptIsActive () const
 
void clearConsole ()
 
void hideConsole ()
 
void addInput (const std::string &text)
 
virtual void NotifyOutput (const std::string &text) override
 
virtual void NotifyWarning (const std::string &text) override
 
virtual void NotifyError (const std::string &text) override
 
virtual void NotifyInputReadyStateChanged (BNScriptingProviderInputReadyState state) override
 
virtual void notifyViewChanged (ViewFrame *frame) override
 
virtual void notifyFontChanged () override
 
virtual void focus () override
 
void moveUpInHistory ()
 
void moveDownInHistory ()
 
std::vector< std::string > reverseSearch (const QString &text)
 
void closing () override
 
void runScriptFromFile (const std::string &filename)
 
- Public Member Functions inherited from SidebarWidget
 SidebarWidget (const QString &title)
 
 ~SidebarWidget ()
 
const QString & title () const
 
void enableRefreshTimer (int interval)
 
void setRefreshQuiesce (bool enable)
 
bool isQuiesced () const
 
virtual void notifyRefresh ()
 
virtual void notifyQuiesce (bool)
 
virtual void notifyOffsetChanged (uint64_t)
 
virtual void notifyThemeChanged ()
 
virtual void notifyViewLocationChanged (View *, const ViewLocation &)
 
virtual void setPrimaryOrientation (Qt::Orientation)
 
virtual QWidget * headerWidget ()
 

Protected Member Functions

void customEvent (QEvent *event) override
 

Additional Inherited Members

- Protected Attributes inherited from SidebarWidget
QString m_title
 
UIActionHandler m_actionHandler
 
ContextMenuManagerm_contextMenuManager = nullptr
 
Menum_menu = nullptr
 
bool m_quiesceState = true
 
QTimer * m_updateTimer = nullptr
 

Constructor & Destructor Documentation

◆ ScriptingConsole()

ScriptingConsole::ScriptingConsole ( QWidget * parent,
const QString & providerName,
const QString & instanceName,
ScriptingInstanceRef instance )

◆ ~ScriptingConsole()

virtual ScriptingConsole::~ScriptingConsole ( )
virtual

Member Function Documentation

◆ viewChanged

void ScriptingConsole::viewChanged ( QWidget * frame)
signal

◆ onScriptExecution

void ScriptingConsole::onScriptExecution ( )
signal

◆ onScriptCompletion

void ScriptingConsole::onScriptCompletion ( )
signal

◆ customEvent()

void ScriptingConsole::customEvent ( QEvent * event)
overrideprotected

◆ getProviderName()

QString ScriptingConsole::getProviderName ( ) const
inline

◆ getInstanceName()

QString ScriptingConsole::getInstanceName ( ) const
inline

◆ getInstance()

ScriptingInstanceRef ScriptingConsole::getInstance ( )
inline

◆ getScriptIsActive()

bool ScriptingConsole::getScriptIsActive ( ) const
inline

◆ clearConsole()

void ScriptingConsole::clearConsole ( )

◆ hideConsole()

void ScriptingConsole::hideConsole ( )

◆ addInput()

void ScriptingConsole::addInput ( const std::string & text)

◆ NotifyOutput()

virtual void ScriptingConsole::NotifyOutput ( const std::string & text)
overridevirtual

◆ NotifyWarning()

virtual void ScriptingConsole::NotifyWarning ( const std::string & text)
overridevirtual

◆ NotifyError()

virtual void ScriptingConsole::NotifyError ( const std::string & text)
overridevirtual

◆ NotifyInputReadyStateChanged()

virtual void ScriptingConsole::NotifyInputReadyStateChanged ( BNScriptingProviderInputReadyState state)
overridevirtual

◆ notifyViewChanged()

virtual void ScriptingConsole::notifyViewChanged ( ViewFrame * frame)
overridevirtual

Reimplemented from SidebarWidget.

◆ notifyFontChanged()

virtual void ScriptingConsole::notifyFontChanged ( )
overridevirtual

Reimplemented from SidebarWidget.

◆ focus()

virtual void ScriptingConsole::focus ( )
overridevirtual

Reimplemented from SidebarWidget.

◆ moveUpInHistory()

void ScriptingConsole::moveUpInHistory ( )

◆ moveDownInHistory()

void ScriptingConsole::moveDownInHistory ( )

◆ reverseSearch()

std::vector< std::string > ScriptingConsole::reverseSearch ( const QString & text)

◆ closing()

void ScriptingConsole::closing ( )
overridevirtual

Reimplemented from SidebarWidget.

◆ runScriptFromFile()

void ScriptingConsole::runScriptFromFile ( const std::string & filename)

◆ ScriptingConsoleSidebarWidgetType

class ScriptingConsoleSidebarWidgetType

Public Member Functions

 ScriptingConsoleSidebarWidgetType ()
 
SidebarWidgetLocation defaultLocation () const override
 
SidebarContextSensitivity contextSensitivity () const override
 
bool alwaysShowTabs () const override
 
- Public Member Functions inherited from SidebarWidgetType
 SidebarWidgetType (const QImage &icon, const QString &name)
 
virtual ~SidebarWidgetType ()
 
const SidebarIconicon () const
 
const QString & name () const
 
virtual bool isInReferenceArea () const
 
virtual bool viewSensitive () const
 
virtual bool hideIfNoContent () const
 
virtual SidebarWidgetcreateWidget (ViewFrame *, BinaryViewRef)
 
virtual SidebarWidgetcreateInvalidContextWidget ()
 
virtual QWidget * headerWidget (SplitPaneWidget *, ViewFrame *, BinaryViewRef)
 
virtual bool focusHeaderWidget () const
 
virtual QString noWidgetMessage () const
 
virtual DockableTabStyletabStyle () const
 
virtual bool canUseAsPane (SplitPaneWidget *, BinaryViewRef) const
 
virtual PanecreatePane (SplitPaneWidget *, BinaryViewRef)
 
void updateTheme ()
 

Constructor & Destructor Documentation

◆ ScriptingConsoleSidebarWidgetType()

ScriptingConsoleSidebarWidgetType::ScriptingConsoleSidebarWidgetType ( )

Member Function Documentation

◆ defaultLocation()

SidebarWidgetLocation ScriptingConsoleSidebarWidgetType::defaultLocation ( ) const
inlineoverridevirtual

Reimplemented from SidebarWidgetType.

◆ contextSensitivity()

SidebarContextSensitivity ScriptingConsoleSidebarWidgetType::contextSensitivity ( ) const
inlineoverridevirtual

Reimplemented from SidebarWidgetType.

◆ alwaysShowTabs()

bool ScriptingConsoleSidebarWidgetType::alwaysShowTabs ( ) const
inlineoverridevirtual

Reimplemented from SidebarWidgetType.