|
wxMaxima
|
This class generates a pane containing the last commands that were issued. More...
#include <CharButton.h>
Data Structures | |
| struct | Definition |
| A definition of this button, used to construct it. More... | |
Public Member Functions | |
| CharButton (wxWindow *parent, wxWindow *worksheet, Configuration *config, const Definition &def, bool forceShow=false) | |
| A flat, compact button for the greek and the symbols pane. | |
| wxWindow * | GetTextObject () const |
| const wxString & | GetSymbol () const |
| The symbol this button enters. | |
| void | UpdateToolTip () |
| Shows the symbol's keyboard shortcut, if it has one, in the tooltip. | |
| void | ActivateButton () |
| Emit this button's symbol to the worksheet – the button's action, shared by the mouse handler and the accessibility "Press" default action. | |
| void | UpdateMinSize () |
| Sets the min size the button needs to show its symbol. | |
Static Public Member Functions | |
| static CharButton * | FromEventObject (wxObject *object) |
| The button a mouse event in a sidebar happened on, or nullptr. | |
| static bool | EditShortcut (wxWindow *parent, Configuration *configuration, const wxString &symbol) |
Asks for the keyboard shortcut that types symbol and stores it. | |
| static wxString | AppendShortcutMenuItem (wxMenu *menu, const wxMouseEvent &event) |
| Adds the "Keyboard shortcut for..." entry to a sidebar's context menu. | |
Protected Attributes | |
| wxString | m_symbol |
| Configuration * | m_configuration |
| wxString | m_description |
| wxString | m_toolTipBase |
| The tooltip without the keyboard shortcut. | |
| wxString | m_toolTip |
| The tooltip as last set. | |
This class generates a pane containing the last commands that were issued.
| CharButton::CharButton | ( | wxWindow * | parent, |
| wxWindow * | worksheet, | ||
| Configuration * | config, | ||
| const Definition & | def, | ||
| bool | forceShow = false |
||
| ) |
A flat, compact button for the greek and the symbols pane.
| parent | The parent panel/window |
| worksheet | The worksheet this button sends char events to |
| def | The definition of the button |
|
static |
Adds the "Keyboard shortcut for..." entry to a sidebar's context menu.
if the right click that opens it was on a button. Returns the symbol of that button, which the sidebar keeps until the entry is chosen, or an empty string.
|
static |
Asks for the keyboard shortcut that types symbol and stores it.
Returns whether the shortcut changed.
|
static |
The button a mouse event in a sidebar happened on, or nullptr.
The event may come from the button or from the text inside it.
| void CharButton::UpdateMinSize | ( | ) |
Sets the min size the button needs to show its symbol.
Called from the constructor, so the size is known before the button ever receives a size event, and again on every size event, in case the font or the scale factor has changed since.
| void CharButton::UpdateToolTip | ( | ) |
Shows the symbol's keyboard shortcut, if it has one, in the tooltip.
Also runs whenever the mouse enters the button, so the tooltip is never behind a shortcut changed elsewhere.