Merge branch 'master' into wip

This commit is contained in:
Matthias Koefferlein
2024-01-07 17:25:11 +01:00
17 changed files with 431 additions and 99 deletions
@@ -474,6 +474,12 @@ static lay::AbstractMenu *menu (lay::LayoutViewBase *view)
return view->menu ();
}
static bool view_is_dirty (lay::LayoutViewBase *view)
{
view->refresh ();
return view->is_dirty ();
}
LAYBASIC_PUBLIC Class<lay::LayoutViewBase> decl_LayoutViewBase ("lay", "LayoutViewBase",
gsi::constant ("LV_NoLayers", (unsigned int) lay::LayoutViewBase::LV_NoLayers,
"@brief With this option, no layers view will be provided (see \\layer_control_frame)\n"
@@ -1136,6 +1142,13 @@ LAYBASIC_PUBLIC Class<lay::LayoutViewBase> decl_LayoutViewBase ("lay", "LayoutVi
"Show the layout in full depth down to the deepest level of hierarchy. "
"This method may cause a redraw."
) +
gsi::method_ext ("is_dirty?", &view_is_dirty,
"@brief Gets a flag indicating whether one of the layouts displayed needs saving\n"
"A layout is 'dirty' if it is modified and needs saving. This method returns "
"true if this is the case for at least one of the layouts shown in the view.\n"
"\n"
"This method has been introduced in version 0.29.\n"
) +
gsi::method ("resize", static_cast<void (lay::LayoutViewBase::*) (unsigned int, unsigned int)> (&lay::LayoutViewBase::resize), gsi::arg ("w"), gsi::arg ("h"),
"@brief Resizes the layout view to the given dimension\n"
"\n"
+5 -2
View File
@@ -2749,6 +2749,11 @@ public:
return m_options;
}
/**
* @brief Calls deferred methods and updates view ops, provided for GSI bindings mainly
*/
void refresh ();
private:
// event handlers used to connect to the layout object's events
void signal_hier_changed ();
@@ -2917,8 +2922,6 @@ private:
void init_layer_properties (LayerProperties &props, const LayerPropertiesList &lp_list) const;
void merge_dither_pattern (lay::LayerPropertiesList &props);
void refresh ();
protected:
/**
* @brief Constructor for calling from a LayoutView