Mercurial > octave
comparison libinterp/dldfcn/__init_fltk__.cc @ 31771:21f9b34eb893
maint: Eliminate "(void)" in C++ function prototypes/declarations.
* mk-opts.pl, external.txi, embedded.cc, make_int.cc, standalone.cc,
standalonebuiltin.cc, BaseControl.cc, BaseControl.h, ButtonControl.cc,
ButtonControl.h, ButtonGroup.cc, ButtonGroup.h, Canvas.cc, Canvas.h,
CheckBoxControl.cc, CheckBoxControl.h, Container.cc, Container.h,
ContextMenu.cc, ContextMenu.h, EditControl.cc, EditControl.h, Figure.cc,
Figure.h, FigureWindow.cc, FigureWindow.h, GLCanvas.cc, GLCanvas.h,
GenericEventNotify.h, KeyMap.cc, ListBoxControl.cc, ListBoxControl.h,
Logger.cc, Logger.h, Menu.cc, Menu.h, MenuContainer.h, Object.cc, Object.h,
ObjectProxy.cc, ObjectProxy.h, Panel.cc, Panel.h, PopupMenuControl.cc,
PopupMenuControl.h, PushButtonControl.cc, PushButtonControl.h, PushTool.cc,
PushTool.h, RadioButtonControl.cc, RadioButtonControl.h, SliderControl.cc,
SliderControl.h, Table.cc, Table.h, TextControl.cc, TextControl.h, TextEdit.h,
ToggleButtonControl.cc, ToggleButtonControl.h, ToggleTool.cc, ToggleTool.h,
ToolBar.cc, ToolBar.h, ToolBarButton.cc, ToolBarButton.h, gl-select.cc,
gl-select.h, qopengl-functions.h, qt-graphics-toolkit.h, qdialog.cpp,
qfontdialog.cpp, qprintdialog_win.cpp, liboctgui-build-info.h,
liboctgui-build-info.in.cc, color-picker.cc, color-picker.h, command-widget.cc,
command-widget.h, community-news.cc, community-news.h, dialog.cc, dialog.h,
documentation-bookmarks.cc, documentation-bookmarks.h,
documentation-dock-widget.cc, documentation-dock-widget.h, documentation.cc,
documentation.h, dw-main-window.cc, dw-main-window.h,
external-editor-interface.cc, external-editor-interface.h,
files-dock-widget.cc, files-dock-widget.h, find-files-dialog.cc,
find-files-dialog.h, find-files-model.cc, find-files-model.h,
gui-preferences.cc, gui-preferences.h, gui-settings.cc, gui-settings.h,
history-dock-widget.cc, history-dock-widget.h, interpreter-qobject.cc,
interpreter-qobject.h, file-editor-interface.h, file-editor-tab.cc,
file-editor-tab.h, file-editor.cc, file-editor.h, find-dialog.cc,
find-dialog.h, marker.cc, marker.h, octave-qscintilla.cc, octave-qscintilla.h,
octave-txt-lexer.cc, octave-txt-lexer.h, main-window.cc, main-window.h,
news-reader.cc, news-reader.h, octave-dock-widget.cc, octave-dock-widget.h,
octave-qobject.cc, octave-qobject.h, qt-application.cc, qt-application.h,
qt-interpreter-events.cc, qt-interpreter-events.h, release-notes.cc,
release-notes.h, set-path-dialog.cc, set-path-dialog.h, set-path-model.cc,
set-path-model.h, settings-dialog.cc, settings-dialog.h,
shortcuts-tree-widget.cc, shortcuts-tree-widget.h, tab-bar.cc, tab-bar.h,
terminal-dock-widget.cc, terminal-dock-widget.h, variable-editor-model.cc,
variable-editor-model.h, variable-editor.cc, variable-editor.h,
welcome-wizard.cc, welcome-wizard.h, workspace-model.cc, workspace-model.h,
workspace-view.cc, workspace-view.h, build-env.h, Cell.cc, Cell.h,
__contourc__.cc, __magick_read__.cc, auto-shlib.cc, auto-shlib.h,
base-text-renderer.h, bsxfun.cc, c-file-ptr-stream.cc, c-file-ptr-stream.h,
call-stack.cc, call-stack.h, debug.cc, defaults.cc, defaults.h, defun.cc,
display.cc, display.h, dynamic-ld.cc, dynamic-ld.h, environment.cc,
environment.h, error.cc, error.h, errwarn.cc, errwarn.h, event-manager.cc,
event-manager.h, event-queue.cc, event-queue.h, fcn-info.cc, fcn-info.h,
ft-text-renderer.cc, ft-text-renderer.h, genprops.awk, gh-manager.cc,
gh-manager.h, gl-render.cc, gl-render.h, gl2ps-print.cc, graphics-toolkit.h,
graphics.cc, graphics.in.h, gtk-manager.cc, gtk-manager.h, help.cc, help.h,
hook-fcn.h, input.cc, input.h, interpreter-private.cc, interpreter-private.h,
interpreter.cc, interpreter.h, jsondecode.cc, latex-text-renderer.cc,
latex-text-renderer.h, load-path.cc, load-path.h, load-save.cc, load-save.h,
ls-hdf5.cc, ls-hdf5.h, mxarray.h, oct-errno.h, oct-errno.in.cc, oct-fstrm.cc,
oct-fstrm.h, oct-handle.h, oct-hist.cc, oct-hist.h, oct-iostrm.cc,
oct-iostrm.h, oct-map.cc, oct-map.h, oct-opengl.h, oct-prcstrm.cc,
oct-prcstrm.h, oct-procbuf.cc, oct-procbuf.h, oct-process.h, oct-stdstrm.h,
oct-stream.cc, oct-stream.h, oct-strstrm.cc, oct-strstrm.h,
oct-tex-lexer.in.ll, pager.cc, pager.h, pr-flt-fmt.cc, pr-flt-fmt.h,
pr-output.cc, pr-output.h, procstream.cc, procstream.h, settings.cc,
settings.h, sighandlers.cc, sighandlers.h, stack-frame.cc, stack-frame.h,
svd.cc, syminfo.cc, syminfo.h, symrec.cc, symrec.h, symscope.cc, symscope.h,
symtab.cc, symtab.h, sysdep.cc, sysdep.h, text-engine.cc, text-engine.h,
text-renderer.cc, text-renderer.h, toplev.cc, url-handle-manager.cc,
url-handle-manager.h, variables.cc, xpow.cc, __init_fltk__.cc,
__init_gnuplot__.cc, __ode15__.cc, audiodevinfo.cc, gzip.cc,
liboctinterp-build-info.h, liboctinterp-build-info.in.cc,
mk-build-env-features.sh, mk-builtins.pl, cdef-class.cc, cdef-class.h,
cdef-manager.h, cdef-method.cc, cdef-method.h, cdef-object.cc, cdef-object.h,
cdef-package.cc, cdef-package.h, cdef-property.cc, cdef-property.h,
cdef-utils.cc, cdef-utils.h, ov-base-diag.cc, ov-base-diag.h, ov-base-int.cc,
ov-base-int.h, ov-base-mat.cc, ov-base-mat.h, ov-base-scalar.cc,
ov-base-scalar.h, ov-base-sparse.cc, ov-base-sparse.h, ov-base.cc, ov-base.h,
ov-bool-mat.cc, ov-bool-mat.h, ov-bool-sparse.cc, ov-bool-sparse.h, ov-bool.cc,
ov-bool.h, ov-builtin.cc, ov-builtin.h, ov-cell.cc, ov-cell.h, ov-ch-mat.cc,
ov-ch-mat.h, ov-class.cc, ov-class.h, ov-classdef.cc, ov-classdef.h,
ov-colon.h, ov-complex.cc, ov-complex.h, ov-cs-list.h, ov-cx-diag.cc,
ov-cx-diag.h, ov-cx-mat.cc, ov-cx-mat.h, ov-cx-sparse.cc, ov-cx-sparse.h,
ov-dld-fcn.cc, ov-dld-fcn.h, ov-fcn-handle.cc, ov-fcn-handle.h, ov-fcn.cc,
ov-fcn.h, ov-float.cc, ov-float.h, ov-flt-complex.cc, ov-flt-complex.h,
ov-flt-cx-diag.cc, ov-flt-cx-diag.h, ov-flt-cx-mat.cc, ov-flt-cx-mat.h,
ov-flt-re-diag.cc, ov-flt-re-diag.h, ov-flt-re-mat.cc, ov-flt-re-mat.h,
ov-intx.h, ov-java.cc, ov-java.h, ov-lazy-idx.cc, ov-lazy-idx.h,
ov-legacy-range.cc, ov-legacy-range.h, ov-magic-int.cc, ov-magic-int.h,
ov-mex-fcn.cc, ov-mex-fcn.h, ov-null-mat.cc, ov-null-mat.h, ov-oncleanup.cc,
ov-oncleanup.h, ov-perm.cc, ov-perm.h, ov-range.cc, ov-range.h, ov-re-diag.cc,
ov-re-diag.h, ov-re-mat.cc, ov-re-mat.h, ov-re-sparse.cc, ov-re-sparse.h,
ov-scalar.cc, ov-scalar.h, ov-str-mat.cc, ov-str-mat.h, ov-struct.cc,
ov-struct.h, ov-typeinfo.cc, ov-typeinfo.h, ov-usr-fcn.cc, ov-usr-fcn.h, ov.cc,
ov.h, ovl.cc, ovl.h, octave.cc, octave.h, anon-fcn-validator.h, bp-table.cc,
bp-table.h, comment-list.cc, comment-list.h, filepos.h, lex.h, lex.ll,
oct-lvalue.cc, oct-lvalue.h, oct-parse.yy, parse.h, profiler.cc, profiler.h,
pt-anon-scopes.h, pt-arg-list.cc, pt-arg-list.h, pt-args-block.cc,
pt-args-block.h, pt-array-list.cc, pt-array-list.h, pt-assign.cc, pt-assign.h,
pt-binop.cc, pt-binop.h, pt-bp.h, pt-cbinop.h, pt-cell.h, pt-check.h,
pt-classdef.cc, pt-classdef.h, pt-cmd.h, pt-colon.h, pt-const.h, pt-decl.cc,
pt-decl.h, pt-eval.cc, pt-eval.h, pt-except.cc, pt-except.h, pt-exp.cc,
pt-exp.h, pt-fcn-handle.cc, pt-fcn-handle.h, pt-id.cc, pt-id.h, pt-idx.cc,
pt-idx.h, pt-jump.h, pt-loop.cc, pt-loop.h, pt-mat.h, pt-misc.cc, pt-misc.h,
pt-pr-code.cc, pt-pr-code.h, pt-select.cc, pt-select.h, pt-spmd.cc, pt-spmd.h,
pt-stmt.cc, pt-stmt.h, pt-tm-const.cc, pt-tm-const.h, pt-unop.cc, pt-unop.h,
pt-walk.h, pt.cc, pt.h, token.cc, token.h, usage.h, Array-base.cc, Array.h,
CColVector.cc, CColVector.h, CDiagMatrix.cc, CDiagMatrix.h, CMatrix.cc,
CMatrix.h, CNDArray.cc, CNDArray.h, CRowVector.cc, CRowVector.h, CSparse.cc,
CSparse.h, DiagArray2.cc, DiagArray2.h, MArray.cc, MArray.h, MDiagArray2.h,
MSparse.h, MatrixType.cc, MatrixType.h, PermMatrix.cc, PermMatrix.h, Range.cc,
Range.h, Sparse-b.cc, Sparse.cc, Sparse.h, boolMatrix.cc, boolMatrix.h,
boolNDArray.cc, boolNDArray.h, boolSparse.cc, boolSparse.h, chMatrix.h,
chNDArray.h, dColVector.cc, dColVector.h, dDiagMatrix.cc, dDiagMatrix.h,
dMatrix.cc, dMatrix.h, dNDArray.cc, dNDArray.h, dRowVector.cc, dRowVector.h,
dSparse.cc, dSparse.h, dim-vector.cc, dim-vector.h, fCColVector.cc,
fCColVector.h, fCDiagMatrix.cc, fCDiagMatrix.h, fCMatrix.cc, fCMatrix.h,
fCNDArray.cc, fCNDArray.h, fCRowVector.cc, fCRowVector.h, fColVector.cc,
fColVector.h, fDiagMatrix.cc, fDiagMatrix.h, fMatrix.cc, fMatrix.h,
fNDArray.cc, fNDArray.h, fRowVector.cc, fRowVector.h, idx-vector.cc,
idx-vector.h, intNDArray.cc, intNDArray.h, liboctave-build-info.h,
liboctave-build-info.in.cc, CollocWt.cc, CollocWt.h, DAE.h, DAEFunc.h, DAERT.h,
DAERTFunc.h, DASPK.cc, DASPK.h, DASRT.cc, DASRT.h, DASSL.cc, DASSL.h, DET.h,
EIG.h, LSODE.cc, LSODE.h, ODE.h, ODEFunc.h, ODES.h, ODESFunc.h, Quad.h,
aepbalance.cc, aepbalance.h, base-dae.h, base-de.h, chol.cc, chol.h,
eigs-base.cc, fEIG.h, gepbalance.h, gsvd.cc, gsvd.h, hess.h, lu.cc, lu.h,
oct-fftw.cc, oct-fftw.h, oct-rand.cc, oct-rand.h, oct-spparms.cc,
oct-spparms.h, qr.cc, qr.h, qrp.cc, qrp.h, randmtzig.cc, randmtzig.h, schur.h,
sparse-chol.cc, sparse-chol.h, sparse-lu.cc, sparse-lu.h, sparse-qr.cc,
sparse-qr.h, svd.cc, svd.h, child-list.cc, child-list.h, dir-ops.cc, dir-ops.h,
file-ops.cc, file-ops.h, file-stat.cc, file-stat.h, lo-sysdep.cc, lo-sysdep.h,
lo-sysinfo.cc, lo-sysinfo.h, mach-info.cc, mach-info.h, oct-env.cc, oct-env.h,
oct-group.cc, oct-group.h, oct-password.cc, oct-password.h, oct-syscalls.cc,
oct-syscalls.h, oct-time.cc, oct-time.h, oct-uname.cc, oct-uname.h,
action-container.h, base-list.h, caseless-str.h, cmd-edit.cc, cmd-edit.h,
cmd-hist.cc, cmd-hist.h, data-conv.cc, file-info.h, glob-match.cc,
glob-match.h, kpse.cc, kpse.h, lo-array-errwarn.cc, lo-array-errwarn.h,
lo-hash.cc, lo-hash.h, lo-ieee.cc, lo-ieee.h, lo-regexp.cc, lo-regexp.h,
oct-inttypes.cc, oct-inttypes.h, oct-mutex.cc, oct-mutex.h, oct-refcount.h,
oct-shlib.cc, oct-shlib.h, oct-sort.cc, oct-sort.h, oct-sparse.cc,
octave-preserve-stream-state.h, pathsearch.cc, pathsearch.h, quit.cc,
singleton-cleanup.cc, singleton-cleanup.h, str-vec.cc, str-vec.h,
unwind-prot.cc, unwind-prot.h, url-transfer.cc, url-transfer.h, version.cc,
version.in.h, cxx-signal-helpers.cc, acinclude.m4, main-cli.cc, main-gui.cc,
main.in.cc, mkoctfile.in.cc, octave-build-info.h, octave-build-info.in.cc,
octave-config.in.cc, octave-svgconvert.cc, shared-fcns.h:
maint: Eliminate "(void)" in C++ function prototypes/declarations.
author | Rik <rik@octave.org> |
---|---|
date | Tue, 24 Jan 2023 17:19:44 -0800 |
parents | 610a85b0ff62 |
children | e25bf4beb488 |
comparison
equal
deleted
inserted
replaced
31770:1d1eff97670e | 31771:21f9b34eb893 |
---|---|
142 err_disabled_feature ("OpenGL_fltk", "OpenGL"); | 142 err_disabled_feature ("OpenGL_fltk", "OpenGL"); |
143 | 143 |
144 #endif | 144 #endif |
145 } | 145 } |
146 | 146 |
147 ~OpenGL_fltk (void) = default; | 147 ~OpenGL_fltk () = default; |
148 | 148 |
149 void zoom (bool z) | 149 void zoom (bool z) |
150 { | 150 { |
151 m_in_zoom = z; | 151 m_in_zoom = z; |
152 if (! m_in_zoom) | 152 if (! m_in_zoom) |
153 hide_overlay (); | 153 hide_overlay (); |
154 } | 154 } |
155 | 155 |
156 bool zoom (void) { return m_in_zoom; } | 156 bool zoom () { return m_in_zoom; } |
157 void set_zoom_box (const Matrix& zb) { m_zoom_box = zb; } | 157 void set_zoom_box (const Matrix& zb) { m_zoom_box = zb; } |
158 | 158 |
159 void print (const std::string& cmd, const std::string& term) | 159 void print (const std::string& cmd, const std::string& term) |
160 { | 160 { |
161 gh_manager& gh_mgr = octave::__get_gh_manager__ (); | 161 gh_manager& gh_mgr = octave::__get_gh_manager__ (); |
162 | 162 |
163 octave::gl2ps_print (m_glfcns, gh_mgr.get_object (m_number), cmd, term); | 163 octave::gl2ps_print (m_glfcns, gh_mgr.get_object (m_number), cmd, term); |
164 } | 164 } |
165 | 165 |
166 uint8NDArray get_pixels (void) | 166 uint8NDArray get_pixels () |
167 { | 167 { |
168 gh_manager& gh_mgr = octave::__get_gh_manager__ (); | 168 gh_manager& gh_mgr = octave::__get_gh_manager__ (); |
169 | 169 |
170 m_renderer.draw (gh_mgr.get_object (m_number)); | 170 m_renderer.draw (gh_mgr.get_object (m_number)); |
171 | 171 |
216 bool m_in_zoom; | 216 bool m_in_zoom; |
217 | 217 |
218 // (x1,y1,x2,y2) | 218 // (x1,y1,x2,y2) |
219 Matrix m_zoom_box; | 219 Matrix m_zoom_box; |
220 | 220 |
221 void draw (void) | 221 void draw () |
222 { | 222 { |
223 #if defined (HAVE_OPENGL) | 223 #if defined (HAVE_OPENGL) |
224 | 224 |
225 if (! valid ()) | 225 if (! valid ()) |
226 { | 226 { |
244 panic_impossible (); | 244 panic_impossible (); |
245 | 245 |
246 #endif | 246 #endif |
247 } | 247 } |
248 | 248 |
249 void overlay (void) | 249 void overlay () |
250 { | 250 { |
251 Matrix overlaycolor (3, 1); | 251 Matrix overlaycolor (3, 1); |
252 overlaycolor(0) = 0.45; | 252 overlaycolor(0) = 0.45; |
253 overlaycolor(1) = 0.62; | 253 overlaycolor(1) = 0.62; |
254 overlaycolor(2) = 0.81; | 254 overlaycolor(2) = 0.81; |
305 | 305 |
306 fltk_uimenu (int xx, int yy, int ww, int hh) | 306 fltk_uimenu (int xx, int yy, int ww, int hh) |
307 : m_menubar (new Fl_Menu_Bar (xx, yy, ww, hh)) | 307 : m_menubar (new Fl_Menu_Bar (xx, yy, ww, hh)) |
308 { } | 308 { } |
309 | 309 |
310 int items_to_show (void) | 310 int items_to_show () |
311 { | 311 { |
312 //returns the number of visible menu items | 312 //returns the number of visible menu items |
313 int len = m_menubar->size (); | 313 int len = m_menubar->size (); |
314 int n = 0; | 314 int n = 0; |
315 for (int t = 0; t < len; t++) | 315 for (int t = 0; t < len; t++) |
322 } | 322 } |
323 | 323 |
324 return n; | 324 return n; |
325 } | 325 } |
326 | 326 |
327 void show (void) | 327 void show () |
328 { | 328 { |
329 m_menubar->show (); | 329 m_menubar->show (); |
330 m_menubar->redraw (); | 330 m_menubar->redraw (); |
331 } | 331 } |
332 | 332 |
333 void hide (void) | 333 void hide () |
334 { | 334 { |
335 m_menubar->hide (); | 335 m_menubar->hide (); |
336 m_menubar->redraw (); | 336 m_menubar->redraw (); |
337 } | 337 } |
338 | 338 |
339 bool is_visible (void) | 339 bool is_visible () |
340 { | 340 { |
341 return m_menubar->visible (); | 341 return m_menubar->visible (); |
342 } | 342 } |
343 | 343 |
344 int find_index_by_name (const std::string& findname) | 344 int find_index_by_name (const std::string& findname) |
755 | 755 |
756 fltk_uimenu (const fltk_uimenu&) = delete; | 756 fltk_uimenu (const fltk_uimenu&) = delete; |
757 | 757 |
758 fltk_uimenu operator = (const fltk_uimenu&) = delete; | 758 fltk_uimenu operator = (const fltk_uimenu&) = delete; |
759 | 759 |
760 ~fltk_uimenu (void) | 760 ~fltk_uimenu () |
761 { | 761 { |
762 // FLTK is supposed to manage memory for widgets. | 762 // FLTK is supposed to manage memory for widgets. |
763 } | 763 } |
764 | 764 |
765 private: | 765 private: |
886 | 886 |
887 plot_window (const plot_window&) = delete; | 887 plot_window (const plot_window&) = delete; |
888 | 888 |
889 plot_window& operator = (const plot_window&) = delete; | 889 plot_window& operator = (const plot_window&) = delete; |
890 | 890 |
891 ~plot_window (void) | 891 ~plot_window () |
892 { | 892 { |
893 this->hide (); | 893 this->hide (); |
894 Fl::check (); | 894 Fl::check (); |
895 | 895 |
896 delete m_uimenu; | 896 delete m_uimenu; |
897 | 897 |
898 // FLTK is supposed to manage memory for widgets. | 898 // FLTK is supposed to manage memory for widgets. |
899 } | 899 } |
900 | 900 |
901 double number (void) { return m_fp.get___myhandle__ ().value (); } | 901 double number () { return m_fp.get___myhandle__ ().value (); } |
902 | 902 |
903 void renumber (double new_number) | 903 void renumber (double new_number) |
904 { | 904 { |
905 if (! m_canvas) | 905 if (! m_canvas) |
906 error ("unable to renumber figure"); | 906 error ("unable to renumber figure"); |
917 uint8NDArray get_pixels () | 917 uint8NDArray get_pixels () |
918 { | 918 { |
919 return m_canvas->get_pixels (); | 919 return m_canvas->get_pixels (); |
920 } | 920 } |
921 | 921 |
922 void show_menubar (void) | 922 void show_menubar () |
923 { | 923 { |
924 m_uimenu->show (); | 924 m_uimenu->show (); |
925 update_toolbar_position (); | 925 update_toolbar_position (); |
926 } | 926 } |
927 | 927 |
928 void hide_menubar (void) | 928 void hide_menubar () |
929 { | 929 { |
930 m_uimenu->hide (); | 930 m_uimenu->hide (); |
931 update_toolbar_position (); | 931 update_toolbar_position (); |
932 } | 932 } |
933 | 933 |
994 else | 994 else |
995 hide_menubar (); | 995 hide_menubar (); |
996 } | 996 } |
997 } | 997 } |
998 | 998 |
999 void show_canvas (void) | 999 void show_canvas () |
1000 { | 1000 { |
1001 if (! m_canvas->can_do ()) | 1001 if (! m_canvas->can_do ()) |
1002 error ("unable to plot due to insufficient OpenGL support"); | 1002 error ("unable to plot due to insufficient OpenGL support"); |
1003 else if (m_fp.is_visible ()) | 1003 else if (m_fp.is_visible ()) |
1004 { | 1004 { |
1005 m_canvas->show (); | 1005 m_canvas->show (); |
1006 m_canvas->make_current (); | 1006 m_canvas->make_current (); |
1007 } | 1007 } |
1008 } | 1008 } |
1009 | 1009 |
1010 void hide_canvas (void) | 1010 void hide_canvas () |
1011 { | 1011 { |
1012 m_canvas->hide (); | 1012 m_canvas->hide (); |
1013 } | 1013 } |
1014 | 1014 |
1015 // Move the toolbar at the bottom of the plot_window. | 1015 // Move the toolbar at the bottom of the plot_window. |
1063 if (internal) | 1063 if (internal) |
1064 bb = position2outerposition (bb); | 1064 bb = position2outerposition (bb); |
1065 resize (bb(0), bb(1), bb(2), bb(3)); | 1065 resize (bb(0), bb(1), bb(2), bb(3)); |
1066 } | 1066 } |
1067 | 1067 |
1068 void mark_modified (void) | 1068 void mark_modified () |
1069 { | 1069 { |
1070 m_canvas->redraw (); | 1070 m_canvas->redraw (); |
1071 } | 1071 } |
1072 | 1072 |
1073 void set_name (void) | 1073 void set_name () |
1074 { | 1074 { |
1075 m_window_label = m_fp.get_title (); | 1075 m_window_label = m_fp.get_title (); |
1076 label (m_window_label.c_str ()); | 1076 label (m_window_label.c_str ()); |
1077 } | 1077 } |
1078 | 1078 |
1166 ap.set (name, value); | 1166 ap.set (name, value); |
1167 } | 1167 } |
1168 } | 1168 } |
1169 } | 1169 } |
1170 | 1170 |
1171 void axis_auto (void) | 1171 void axis_auto () |
1172 { | 1172 { |
1173 octave_value_list args; | 1173 octave_value_list args; |
1174 if (m_fp.get_currentaxes ().ok ()) | 1174 if (m_fp.get_currentaxes ().ok ()) |
1175 { | 1175 { |
1176 interpreter& interp = __get_interpreter__ (); | 1176 interpreter& interp = __get_interpreter__ (); |
1182 | 1182 |
1183 mark_modified (); | 1183 mark_modified (); |
1184 } | 1184 } |
1185 } | 1185 } |
1186 | 1186 |
1187 void toggle_grid (void) | 1187 void toggle_grid () |
1188 { | 1188 { |
1189 interpreter& interp = __get_interpreter__ (); | 1189 interpreter& interp = __get_interpreter__ (); |
1190 | 1190 |
1191 octave_value_list args; | 1191 octave_value_list args; |
1192 if (m_fp.get_currentaxes ().ok ()) | 1192 if (m_fp.get_currentaxes ().ok ()) |
1473 | 1473 |
1474 // update position | 1474 // update position |
1475 m_fp.set_boundingbox (outerposition2position (bb), true, false); | 1475 m_fp.set_boundingbox (outerposition2position (bb), true, false); |
1476 } | 1476 } |
1477 | 1477 |
1478 bool pan_enabled (void) | 1478 bool pan_enabled () |
1479 { | 1479 { |
1480 // Getting pan mode property: | 1480 // Getting pan mode property: |
1481 octave_value ov_pm = m_fp.get___pan_mode__ (); | 1481 octave_value ov_pm = m_fp.get___pan_mode__ (); |
1482 | 1482 |
1483 octave_scalar_map pm = ov_pm.scalar_map_value (); | 1483 octave_scalar_map pm = ov_pm.scalar_map_value (); |
1484 | 1484 |
1485 return pm.contents ("Enable").string_value () == "on"; | 1485 return pm.contents ("Enable").string_value () == "on"; |
1486 } | 1486 } |
1487 | 1487 |
1488 std::string pan_mode (void) | 1488 std::string pan_mode () |
1489 { | 1489 { |
1490 // Getting pan mode property: | 1490 // Getting pan mode property: |
1491 octave_value ov_pm = m_fp.get___pan_mode__ (); | 1491 octave_value ov_pm = m_fp.get___pan_mode__ (); |
1492 | 1492 |
1493 octave_scalar_map pm = ov_pm.scalar_map_value (); | 1493 octave_scalar_map pm = ov_pm.scalar_map_value (); |
1494 | 1494 |
1495 return pm.contents ("Motion").string_value (); | 1495 return pm.contents ("Motion").string_value (); |
1496 } | 1496 } |
1497 | 1497 |
1498 bool rotate_enabled (void) | 1498 bool rotate_enabled () |
1499 { | 1499 { |
1500 // Getting rotate mode property: | 1500 // Getting rotate mode property: |
1501 octave_value ov_rm = m_fp.get___rotate_mode__ (); | 1501 octave_value ov_rm = m_fp.get___rotate_mode__ (); |
1502 | 1502 |
1503 octave_scalar_map rm = ov_rm.scalar_map_value (); | 1503 octave_scalar_map rm = ov_rm.scalar_map_value (); |
1878 | 1878 |
1879 class figure_manager | 1879 class figure_manager |
1880 { | 1880 { |
1881 private: | 1881 private: |
1882 | 1882 |
1883 figure_manager (void) = default; | 1883 figure_manager () = default; |
1884 | 1884 |
1885 public: | 1885 public: |
1886 | 1886 |
1887 // No copying! | 1887 // No copying! |
1888 | 1888 |
1889 figure_manager (const figure_manager&) = delete; | 1889 figure_manager (const figure_manager&) = delete; |
1890 | 1890 |
1891 figure_manager& operator = (const figure_manager&) = delete; | 1891 figure_manager& operator = (const figure_manager&) = delete; |
1892 | 1892 |
1893 ~figure_manager (void) | 1893 ~figure_manager () |
1894 { | 1894 { |
1895 close_all (); | 1895 close_all (); |
1896 } | 1896 } |
1897 | 1897 |
1898 static bool instance_ok (void) | 1898 static bool instance_ok () |
1899 { | 1899 { |
1900 bool retval = true; | 1900 bool retval = true; |
1901 | 1901 |
1902 if (! instance) | 1902 if (! instance) |
1903 instance = new figure_manager (); | 1903 instance = new figure_manager (); |
1904 | 1904 |
1905 return retval; | 1905 return retval; |
1906 } | 1906 } |
1907 | 1907 |
1908 static void close_all (void) | 1908 static void close_all () |
1909 { | 1909 { |
1910 if (instance_ok ()) | 1910 if (instance_ok ()) |
1911 instance->do_close_all (); | 1911 instance->do_close_all (); |
1912 } | 1912 } |
1913 | 1913 |
2037 | 2037 |
2038 window_map windows; | 2038 window_map windows; |
2039 | 2039 |
2040 static std::string fltk_idx_header; | 2040 static std::string fltk_idx_header; |
2041 | 2041 |
2042 void do_close_all (void) | 2042 void do_close_all () |
2043 { | 2043 { |
2044 wm_iterator win; | 2044 wm_iterator win; |
2045 for (win = windows.begin (); win != windows.end (); win++) | 2045 for (win = windows.begin (); win != windows.end (); win++) |
2046 delete win->second; | 2046 delete win->second; |
2047 windows.clear (); | 2047 windows.clear (); |
2278 m_interpreter (interp), input_event_hook_fcn_id () | 2278 m_interpreter (interp), input_event_hook_fcn_id () |
2279 { | 2279 { |
2280 Fl::visual (FL_RGB); | 2280 Fl::visual (FL_RGB); |
2281 } | 2281 } |
2282 | 2282 |
2283 ~fltk_graphics_toolkit (void) = default; | 2283 ~fltk_graphics_toolkit () = default; |
2284 | 2284 |
2285 bool is_valid (void) const { return true; } | 2285 bool is_valid () const { return true; } |
2286 | 2286 |
2287 bool initialize (const graphics_object& go) | 2287 bool initialize (const graphics_object& go) |
2288 { | 2288 { |
2289 if (go.isa ("figure") | 2289 if (go.isa ("figure") |
2290 || go.isa ("uimenu")) | 2290 || go.isa ("uimenu")) |
2447 { | 2447 { |
2448 return figure_manager::get_size (fh); | 2448 return figure_manager::get_size (fh); |
2449 } | 2449 } |
2450 | 2450 |
2451 /* | 2451 /* |
2452 double get_screen_resolution (void) const | 2452 double get_screen_resolution () const |
2453 { | 2453 { |
2454 // FLTK doesn't give this info. | 2454 // FLTK doesn't give this info. |
2455 return 72.0; | 2455 return 72.0; |
2456 | 2456 |
2457 // FIXME: FLTK >= 1.3.0 could do this with Fl::screen_dpi (h, v, n) | 2457 // FIXME: FLTK >= 1.3.0 could do this with Fl::screen_dpi (h, v, n) |
2458 // but do we need it? | 2458 // but do we need it? |
2459 } | 2459 } |
2460 */ | 2460 */ |
2461 | 2461 |
2462 Matrix get_screen_size (void) const | 2462 Matrix get_screen_size () const |
2463 { | 2463 { |
2464 Matrix sz (1, 2, 0.0); | 2464 Matrix sz (1, 2, 0.0); |
2465 sz(0) = Fl::w (); | 2465 sz(0) = Fl::w (); |
2466 sz(1) = Fl::h (); | 2466 sz(1) = Fl::h (); |
2467 return sz; | 2467 return sz; |
2468 } | 2468 } |
2469 | 2469 |
2470 void close (void) | 2470 void close () |
2471 { | 2471 { |
2472 if (toolkit_loaded) | 2472 if (toolkit_loaded) |
2473 { | 2473 { |
2474 m_interpreter.munlock ("__init_fltk__"); | 2474 m_interpreter.munlock ("__init_fltk__"); |
2475 | 2475 |