wxMaxima
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes
GenWizPanel Class Reference

A dockable, embeddable generic wizard. More...

#include <GenWizPanel.h>

Inheritance diagram for GenWizPanel:
[legend]
Collaboration diagram for GenWizPanel:
[legend]

Public Member Functions

 GenWizPanel (wxWindow *parent, Configuration *cfg, MaximaManual *manual, const wxString &description, const wxString &description_tooltip, const wxString &commandRule, const wxString &label1, const wxString &defaultval1, const wxString &tooltip1={}, const wxString &label2={}, const wxString &defaultval2={}, const wxString &tooltip2={}, const wxString &label3={}, const wxString &defaultval3={}, const wxString &tooltip3={}, const wxString &label4={}, const wxString &defaultval4={}, const wxString &tooltip4={}, const wxString &label5={}, const wxString &defaultval5={}, const wxString &tooltip5={}, const wxString &label6={}, const wxString &defaultval6={}, const wxString &tooltip6={}, const wxString &label7={}, const wxString &defaultval7={}, const wxString &tooltip7={}, const wxString &label8={}, const wxString &defaultval8={}, const wxString &tooltip8={}, const wxString &label9={}, const wxString &defaultval9={}, const wxString &tooltip9={}, const wxString &label10={}, const wxString &defaultval10={}, const wxString &tooltip10={})
 
 GenWizPanel (wxWindow *parent, Configuration *cfg, MaximaManual *manual, const wxString &description={}, const wxString &description_tooltip={}, const wxString &commandRule={}, bool dockable=true, const wxString &label1={}, const wxString &defaultval1={}, const wxString &tooltip1={}, const wxString &label2={}, const wxString &defaultval2={}, const wxString &tooltip2={}, const wxString &label3={}, const wxString &defaultval3={}, const wxString &tooltip3={}, const wxString &label4={}, const wxString &defaultval4={}, const wxString &tooltip4={}, const wxString &label5={}, const wxString &defaultval5={}, const wxString &tooltip5={}, const wxString &label6={}, const wxString &defaultval6={}, const wxString &tooltip6={}, const wxString &label7={}, const wxString &defaultval7={}, const wxString &tooltip7={}, const wxString &label8={}, const wxString &defaultval8={}, const wxString &tooltip8={}, const wxString &label9={}, const wxString &defaultval9={}, const wxString &tooltip9={}, const wxString &label10={}, const wxString &defaultval10={}, const wxString &tooltip10={})
 
void NewWizard (wxString description, const wxString &description_tooltip, const wxString &commandRule, const wxString &label1, const wxString &defaultval1, const wxString &tooltip1, const wxString &label2, const wxString &defaultval2, const wxString &tooltip2, const wxString &label3, const wxString &defaultval3, const wxString &tooltip3, const wxString &label4, const wxString &defaultval4, const wxString &tooltip4, const wxString &label5, const wxString &defaultval5, const wxString &tooltip5, const wxString &label6, const wxString &defaultval6, const wxString &tooltip6, const wxString &label7, const wxString &defaultval7, const wxString &tooltip7, const wxString &label8, const wxString &defaultval8, const wxString &tooltip8, const wxString &label9, const wxString &defaultval9, const wxString &tooltip9, const wxString &label10, const wxString &defaultval10, const wxString &tooltip10)
 Replace the contents of this panel with a new wizard.
 
wxString operator[] (int i) const
 Returns the contents of the nth field.
 
wxString GetOutput () const
 Returns the command the wizard has generated, if commandRule wasn't empty.
 
wxButton * GetOKButton () const
 
wxButton * GetAbortButton () const
 
wxButton * GetInsertButton () const
 
wxString GetHelpKeyword (wxWindowID ID)
 
void OnBestSizeChange (std::function< void()> callback)
 Tell callback whenever the height this panel needs has changed.
 

Protected Member Functions

void OnSize (wxSizeEvent &event)
 
void UpdateOutput ()
 
void OnParamChange (wxCommandEvent &event)
 
void OnTextEnter (wxCommandEvent &event)
 
void OnNotebookPageChange (wxBookCtrlEvent &event)
 
void FitTextHeight (wxTextCtrl *ctrl, bool wordWrap)
 Make ctrl exactly as high as its text needs at its current width.
 
void FitNotebookHeight ()
 Make the notebook as high as its highest page needs.
 

Protected Attributes

wxNotebook * m_notebook
 
std::vector< BTextCtrl * > m_textctrl
 
std::vector< wxStaticText * > m_label
 
wxButton * button_1
 
wxButton * button_2
 
wxContextHelpButton * m_helpButton = nullptr
 
wxButton * m_insertButton
 
wxString m_commandRule
 
wxTextCtrl * m_output
 
wxString m_description
 
wxString m_descriptionToolTip
 
wxString m_title
 
Configuration * m_configuration
 
MaximaManual * m_maximaManual
 

Detailed Description

A dockable, embeddable generic wizard.

The generic wizard dialogue we use almost everywhere where a wizard is needed.

Member Function Documentation

◆ FitTextHeight()

void GenWizPanel::FitTextHeight ( wxTextCtrl *  ctrl,
bool  wordWrap 
)
protected

Make ctrl exactly as high as its text needs at its current width.

A multi-line wxTextCtrl has no idea how high its text is: it would otherwise get a fixed height, or with a stretch factor whatever room is left – which made the Command and Description tabs far higher than their text and pushed the OK button off a docked wizard.

Parameters
wordWrapwhether ctrl wraps between words (wxTE_BESTWRAP) rather than anywhere (wxTE_CHARWRAP)

◆ OnBestSizeChange()

void GenWizPanel::OnBestSizeChange ( std::function< void()>  callback)
inline

Tell callback whenever the height this panel needs has changed.

Its text fields grow and shrink with their text, and with the width they are wrapped to, so this can happen long after the panel has been shown – which matters to whatever has to make room for it.


The documentation for this class was generated from the following files: