Mercurial > hg > octave-nkf
diff src/graphics.cc @ 11155:f0e9befd6a1c
add uimenu graphic object to fltk backend
author | Kai Habel <kai.habel@gmx.de> |
---|---|
date | Mon, 25 Oct 2010 11:26:43 +0200 |
parents | b748b86cb8c1 |
children | a981e2f56ec1 |
line wrap: on
line diff
--- a/src/graphics.cc +++ b/src/graphics.cc @@ -55,7 +55,7 @@ // forward declarations static octave_value xget (const graphics_handle& h, const caseless_str& name); -static graphics_object xget_ancestor (const graphics_object& go_arg, +graphics_object xget_ancestor (const graphics_object& go_arg, const std::string& type); static void @@ -541,7 +541,7 @@ return convert_position (sz, obj.get ("units").string_value (), "pixels", sz.extract_n (0, 2, 1, 2)).extract_n (0, 2, 1, 2); } -static graphics_object +graphics_object xget_ancestor (const graphics_object& go_arg, const std::string& type) { graphics_object go = go_arg; @@ -727,7 +727,7 @@ { pfx = name.substr (0, 6); - if (pfx.compare ("figure")) + if (pfx.compare ("figure") || pfx.compare ("uimenu")) offset = 6; else if (len >= 7) { @@ -773,7 +773,8 @@ go = new surface (h, p); else if (type.compare ("hggroup")) go = new hggroup (h, p); - + else if (type.compare ("uimenu")) + go = new uimenu (h, p); return go; } @@ -1416,7 +1417,7 @@ { pfx = name.substr (0, 6); - if (pfx.compare ("figure")) + if (pfx.compare ("figure") || pfx.compare ("uimenu")) offset = 6; else if (len > 7) { @@ -1454,6 +1455,8 @@ has_property = surface::properties::has_core_property (pname); else if (pfx == "hggroup") has_property = hggroup::properties::has_core_property (pname); + else if (pfx == "uimenu") + has_property = uimenu::properties::has_core_property (pname); if (has_property) { @@ -1512,7 +1515,7 @@ { pfx = name.substr (0, 6); - if (pfx.compare ("figure")) + if (pfx.compare ("figure") || pfx.compare ("uimenu")) offset = 6; else if (len > 7) { @@ -5456,6 +5459,7 @@ plist_map["patch"] = patch::properties::factory_defaults (); plist_map["surface"] = surface::properties::factory_defaults (); plist_map["hggroup"] = hggroup::properties::factory_defaults (); + plist_map["uimenu"] = uimenu::properties::factory_defaults (); return plist_map; } @@ -6027,6 +6031,15 @@ GO_BODY (hggroup); } +DEFUN (__go_uimenu__, args, , + "-*- texinfo -*-\n\ +@deftypefn {Built-in Function} {} __go_uimenu__ (@var{parent})\n\ +Undocumented internal function.\n\ +@end deftypefn") +{ + GO_BODY (uimenu); +} + DEFUN (__go_delete__, args, , "-*- texinfo -*-\n\ @deftypefn {Built-in Function} {} __go_delete__ (@var{h})\n\