31#include <wx/aui/aui.h>
37#ifndef _WXMAXIMA_TOOLBAR_H
38#define _WXMAXIMA_TOOLBAR_H
43 explicit ToolBar(wxWindow *parent);
71 if (!m_needsInformation)
73 SetToolBitmap(tb_follow, m_needsInformationIcon);
74 m_needsInformation =
true;
81 if (m_needsInformation)
83 SetToolBitmap(tb_follow, m_followIcon);
84 m_needsInformation =
false;
94 plot_slider_id = 5500,
101 tb_animation_startStop,
114 wxBitmap m_followIcon;
115 wxBitmap m_needsInformationIcon;
116 wxBitmap m_PlayButton;
117 wxBitmap m_StopButton;
119 void CanUndo(
bool value)
121 if (value != m_canUndo_old)
123 EnableTool(wxID_UNDO, value);
124 m_canUndo_old = value;
128 void CanRedo(
bool value)
130 if (value != m_canRedo_old)
132 EnableTool(wxID_UNDO, value);
133 m_canRedo_old = value;
137 void CanCopy(
bool value)
139 if (value != m_canCopy_old)
141 EnableTool(wxID_COPY, value);
142 m_canCopy_old = value;
146 void CanCut(
bool value)
148 if (value != m_canCut_old)
150 EnableTool(wxID_CUT, value);
151 m_canCut_old = value;
155 void CanSave(
bool value)
157 if (value != m_canSave_old)
159 EnableTool(wxID_SAVE, value);
160 m_canSave_old = value;
164 void CanPrint(
bool value)
166 if (value != m_canPrint_old)
168 EnableTool(wxID_PRINT, value);
169 m_canPrint_old = value;
173 void CanEvalTillHere(
bool value)
175 if (value != m_canEvalTillHere_old)
177 EnableTool(tb_evaltillhere, value);
178 EnableTool(tb_evaluate_rest, value);
179 m_canEvalTillHere_old = value;
183 void CanEvalThisCell(
bool value)
185 if (value != m_canEvalThisCell_old)
187 EnableTool(tb_eval, value);
188 m_canEvalThisCell_old = value;
192 void WorksheetEmpty(
bool value)
194 if (value != m_worksheetEmpty_old)
196 EnableTool(tb_eval_all, !value);
197 m_worksheetEmpty_old = value;
204 int GetIdealHeight(){
205 return m_needsInformationIcon.GetSize().y;
225 wxBitmap GetCopyBitmap(wxSize siz);
226 wxBitmap GetPasteBitmap(wxSize siz);
227 wxBitmap GetEvalAllBitmap(wxSize siz);
228 wxBitmap GetEvalBitmap(wxSize siz);
229 wxBitmap GetNewBitmap(wxSize siz);
230 wxBitmap GetOpenBitmap(wxSize siz);
231 wxBitmap GetSaveBitmap(wxSize siz);
232 wxBitmap GetPrintBitmap(wxSize siz);
233 wxBitmap GetPreferencesBitmap(wxSize siz);
234 wxBitmap GetCutBitmap(wxSize siz);
235 wxBitmap GetUndoBitmap(wxSize siz);
236 wxBitmap GetRedoBitmap(wxSize siz);
237 wxBitmap GetSelectAllBitmap(wxSize siz);
238 wxBitmap GetFindBitmap(wxSize siz);
239 wxBitmap GetRestartBitmap(wxSize siz);
240 wxBitmap GetInterruptBitmap(wxSize siz);
241 wxBitmap GetEvalTillHereBitmap(wxSize siz);
242 wxBitmap GetHelpBitmap(wxSize siz);
243 wxBitmap GetEvalRestBitmap(wxSize siz);
244 wxBitmap GetHideCodeBitmap(wxSize siz);
246 wxSize GetOptimalBitmapSize();
248 bool ShowUndoRedo(){
bool show =
false; wxConfig::Get()->Read(
"Toolbar/showUndoRedo", &show);
250 void ShowUndoRedo(
bool show){wxConfig::Get()->Write(
"Toolbar/showUndoRedo", show);}
252 bool ShowCopyPaste(){
bool show =
true; wxConfig::Get()->Read(
"Toolbar/showCopyPaste", &show);
254 void ShowCopyPaste(
bool show){wxConfig::Get()->Write(
"Toolbar/showCopyPaste", show);}
256 bool ShowOpenSave(){
bool show =
true; wxConfig::Get()->Read(
"Toolbar/showOpenSave", &show);
258 void ShowOpenSave(
bool show){wxConfig::Get()->Write(
"Toolbar/showOpenSave", show);}
260 bool ShowNew(){
bool show =
true; wxConfig::Get()->Read(
"Toolbar/showNew", &show);
262 void ShowNew(
bool show){wxConfig::Get()->Write(
"Toolbar/showNew", show);}
264 bool ShowSearch(){
bool show =
true; wxConfig::Get()->Read(
"Toolbar/showSearch", &show);
266 void ShowSearch(
bool show){wxConfig::Get()->Write(
"Toolbar/showSearch", show);}
268 bool ShowHelp(){
bool show =
true; wxConfig::Get()->Read(
"Toolbar/showHelp", &show);
270 void ShowHelp(
bool show){wxConfig::Get()->Write(
"Toolbar/showHelp", show);}
272 bool ShowPrint(){
bool show =
true; wxConfig::Get()->Read(
"Toolbar/showPrint", &show);
274 void ShowPrint(
bool show){wxConfig::Get()->Write(
"Toolbar/showPrint", show);}
276 bool ShowOptions(){
bool show =
true; wxConfig::Get()->Read(
"Toolbar/showOptions", &show);
278 void ShowOptions(
bool show){wxConfig::Get()->Write(
"Toolbar/showOptions", show);}
280 bool ShowSelectAll(){
bool show =
true; wxConfig::Get()->Read(
"Toolbar/showSelectAll", &show);
282 void ShowSelectAll(
bool show){wxConfig::Get()->Write(
"Toolbar/showSelectAll", show);}
285 void OnSize(wxSizeEvent &event);
286 void OnMouseRightDown(wxMouseEvent &event);
287 void OnMenu(wxMenuEvent &event);
292 GroupType m_defaultCellStyle = GC_TYPE_CODE;
294 wxChoice *m_textStyle = NULL;
296 std::size_t m_animationDisplayedIndex = 0;
298 std::size_t m_animationMaxIndex;
299 bool m_canRedo_old =
true;
300 bool m_canUndo_old =
true;
301 bool m_canCopy_old =
true;
302 bool m_canCut_old =
true;
303 bool m_canSave_old =
true;
304 bool m_canPrint_old =
true;
305 bool m_canEvalTillHere_old =
true;
306 bool m_canEvalThisCell_old =
true;
307 std::unique_ptr<
struct wxm_NSVGrasterizer, decltype(std::free)*> m_svgRast{
nullptr, std::free};
308 bool m_worksheetEmpty_old =
false;
311 bool m_needsInformation =
false;
This file declares the class AnimationCell.
This file defines the class GroupCell that bundles input and output in the worksheet.
GroupType
All types a GroupCell can be of.
Definition: GroupCell.h:42
Definition: AnimationCell.h:46