# HG changeset patch # User Rik # Date 1399478059 25200 # Node ID 9fbb254c09e62d3ed359f4a81e9d92579d92917a # Parent 333901476119d5fedd302310b7ee85a43544fa0e build: Fix compiling with new graphic root properties (cset 28eab2d84190). * graphics.in.h: Remove #include "builtin-defun-decls.h". Use external, not inline, get/set routines for format and formatspacing properties. Move get/set routines to graphics.cc. * graphics.cc (root_figure::properties::get_format, root_figure::properties::set_format, root_figure::properties::get_formatspacing, root_figure::properties::set_format): New functions moved from graphics.in.h. diff -r 333901476119 -r 9fbb254c09e6 libinterp/corefcn/graphics.cc --- a/libinterp/corefcn/graphics.cc Wed May 07 08:39:56 2014 -0700 +++ b/libinterp/corefcn/graphics.cc Wed May 07 08:54:19 2014 -0700 @@ -3208,25 +3208,6 @@ // --------------------------------------------------------------------- void -root_figure::properties::set_currentfigure (const octave_value& v) -{ - graphics_handle val (v); - - if (error_state) - return; - - if (xisnan (val.value ()) || is_handle (val)) - { - currentfigure = val; - - if (val.ok ()) - gh_manager::push_figure (val); - } - else - gripe_set_invalid ("currentfigure"); -} - -void root_figure::properties::set_callbackobject (const octave_value& v) { graphics_handle val (v); @@ -3257,6 +3238,80 @@ } void +root_figure::properties::set_currentfigure (const octave_value& v) +{ + graphics_handle val (v); + + if (error_state) + return; + + if (xisnan (val.value ()) || is_handle (val)) + { + currentfigure = val; + + if (val.ok ()) + gh_manager::push_figure (val); + } + else + gripe_set_invalid ("currentfigure"); +} + +std::string +root_figure::properties::get_format (void) const +{ + return F__formatstring__ ()(0).string_value (); +} + +void +root_figure::properties::set_format (const octave_value& val) +{ + if (! error_state) + { + // Input checking and abrev. matching + format.set (val, false); + + if (! error_state) + { + Fformat (ovl (format.current_value ())); + + format.run_listeners (); + } + } +} + +std::string +root_figure::properties::get_formatspacing (void) const +{ + bool iscompact = F__compactformat__ ()(0).bool_value (); + if (iscompact) + return std::string ("compact"); + else + return std::string ("loose"); +} + +void +root_figure::properties::set_formatspacing (const octave_value& val) +{ + if (! error_state) + { + // Input checking and abrev. matching + formatspacing.set (val, false); + + if (! error_state) + { + std::string strval = formatspacing.current_value (); + + if (strval == "compact") + F__compactformat__ (ovl (true)); + else + F__compactformat__ (ovl (false)); + + formatspacing.run_listeners (); + } + } +} + +void figure::properties::set_integerhandle (const octave_value& val) { if (! error_state) diff -r 333901476119 -r 9fbb254c09e6 libinterp/corefcn/graphics.in.h --- a/libinterp/corefcn/graphics.in.h Wed May 07 08:39:56 2014 -0700 +++ b/libinterp/corefcn/graphics.in.h Wed May 07 08:54:19 2014 -0700 @@ -45,7 +45,6 @@ #include "oct-refcount.h" #include "ov.h" #include "txt-eng-ft.h" -#include "builtin-defun-decls.h" // FIXME: maybe this should be a configure option? // Matlab defaults to "Helvetica", but that causes problems for many @@ -3130,8 +3129,8 @@ bool_property echo , "off" string_property errormessage , "" string_property fixedwidthfontname , "Courier" - radio_property format gs , "+|bank|bit|hex|long|longe|longeng|longg|native-bit|native-hex|none|rat|{short}|shorte|shorteng|shortg" - radio_property formatspacing gs , "compact|{loose}" + radio_property format GS , "+|bank|bit|hex|long|longe|longeng|longg|native-bit|native-hex|none|rat|{short}|shorte|shorteng|shortg" + radio_property formatspacing GS , "compact|{loose}" string_property language , "ascii" array_property monitorpositions , Matrix (1, 4, 0) array_property pointerlocation , Matrix (1, 2, 0) @@ -3146,57 +3145,6 @@ private: std::list cbo_stack; - - std::string get_formatspacing (void) const - { - bool iscompact = F__compactformat__ ()(0).bool_value (); - if (iscompact) - return std::string ("compact"); - else - return std::string ("loose"); - } - - void set_formatspacing (const octave_value& val) - { - if (! error_state) - { - // Input checking and abrev. matching - formatspacing.set (val, false); - - if (! error_state) - { - std::string strval = formatspacing.current_value (); - - if (strval == "compact") - F__compactformat__ (ovl (true)); - else - F__compactformat__ (ovl (false)); - - formatspacing.run_listeners (); - } - } - } - - std::string get_format (void) const - { - return F__formatstring__ ()(0).string_value (); - } - - void set_format (const octave_value& val) - { - if (! error_state) - { - // Input checking and abrev. matching - format.set (val, false); - - if (! error_state) - { - Fformat (ovl (format.current_value ())); - - format.run_listeners (); - } - } - } };