WIP: split laybasic into layui and layview to separate Qt and non-Qt part even more

This commit is contained in:
Matthias Koefferlein 2022-05-15 00:47:59 +02:00
parent b898af2aca
commit 332daf836e
305 changed files with 2079 additions and 1587 deletions

View File

@ -100,7 +100,7 @@ PluginDeclaration::get_menu_entries (std::vector<lay::MenuEntry> &menu_entries)
}
lay::Plugin *
PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const
PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const
{
return new ant::Service (manager, view);
}

View File

@ -42,7 +42,7 @@ public:
virtual void get_options (std::vector < std::pair<std::string, std::string> > &options) const;
virtual void get_menu_entries (std::vector<lay::MenuEntry> &menu_entries) const;
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const;
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const;
virtual bool implements_editable (std::string &title) const;
virtual bool implements_mouse_mode (std::string &title) const;
virtual bool configure (const std::string &name, const std::string &value);

View File

@ -217,7 +217,7 @@ public:
}
#if defined(HAVE_QT)
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> &pages, lay::LayoutView *view, lay::Dispatcher *root) const
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> &pages, lay::LayoutViewBase *view, lay::Dispatcher *root) const
{
if (mp_pages_f != 0) {
size_t nstart = pages.size ();
@ -229,7 +229,7 @@ public:
}
#endif
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const
{
Svc *service = new Svc (manager, view);
service->set_plugin_declaration (this);
@ -357,7 +357,7 @@ public:
return false;
}
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new edt::MainService (manager, view, root);
}
@ -373,7 +373,7 @@ public:
}
#if defined(HAVE_QT)
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> &pages, lay::LayoutView *view, lay::Dispatcher *dispatcher) const
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> &pages, lay::LayoutViewBase *view, lay::Dispatcher *dispatcher) const
{
// NOTE: we do not set plugin_declaration which makes the page unspecific
EditorOptionsGeneric *generic_opt = new EditorOptionsGeneric (view, dispatcher);
@ -500,12 +500,12 @@ public:
// .. nothing yet ..
}
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> & /*pages*/, lay::LayoutView * /*view*/, lay::Dispatcher * /*root*/) const
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> & /*pages*/, lay::LayoutViewBase * /*view*/, lay::Dispatcher * /*root*/) const
{
// .. no specific ones ..
}
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new edt::PartialService (manager, view, root);
}

View File

@ -44,7 +44,7 @@ PluginDeclaration::get_menu_entries (std::vector<lay::MenuEntry> &menu_entries)
}
lay::Plugin *
PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const
PluginDeclaration::create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const
{
return new img::Service (manager, view);
}

View File

@ -36,7 +36,7 @@ class PluginDeclaration
{
public:
virtual void get_menu_entries (std::vector<lay::MenuEntry> &menu_entries) const;
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutView *view) const;
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *, lay::LayoutViewBase *view) const;
virtual bool implements_editable (std::string &title) const;
virtual void get_options (std::vector < std::pair<std::string, std::string> > &options) const;
};

View File

@ -11,8 +11,10 @@ RDB_INC = $$PWD/rdb/rdb
IMG_INC = $$PWD/img/img
LYM_INC = $$PWD/lym/lym
LIB_INC = $$PWD/lib/lib
LAY_INC = $$PWD/lay/lay
LAYBASIC_INC = $$PWD/laybasic/laybasic
LAYVIEW_INC = $$PWD/layview/layview
LAYUI_INC = $$PWD/layui/layui
LAY_INC = $$PWD/lay/lay
QTBASIC_INC = $$PWD/gsiqt/qtbasic

View File

@ -14,6 +14,7 @@ SUBDIRS = \
buddies \
lym \
laybasic \
layview \
ant \
img \
edt \
@ -28,6 +29,7 @@ equals(HAVE_RUBY, "1") {
SUBDIRS += \
klayout_main \
lay \
layui \
fontgen \
}
@ -66,10 +68,11 @@ buddies.depends += plugins lym $$LANG_DEPENDS
lym.depends += gsi $$LANG_DEPENDS
laybasic.depends += rdb
layview.depends += laybasic
ant.depends += laybasic
img.depends += laybasic
edt.depends += laybasic
ant.depends += layview
img.depends += layview
edt.depends += layview
plugins.depends += lib rdb db ant
@ -98,9 +101,11 @@ equals(HAVE_RUBY, "1") {
}
plugins.depends += lay
layui.depends += rdb
layview.depends += layui
lay.depends += laybasic ant img edt layui
lay.depends += laybasic ant img edt
plugins.depends += lay
klayout_main.depends += plugins $$MAIN_DEPENDS

View File

@ -55,7 +55,7 @@ public:
menu_entries.push_back (lay::menu_item ("clip_tool::show", "clip_tool:edit_mode", "edit_menu.utils_menu.end", tl::to_string (QObject::tr ("Clip Tool"))));
}
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new ClipDialog (root, view);
}

View File

@ -62,7 +62,7 @@ public:
menu_entries.push_back (lay::menu_item ("fill_tool::show", "fill_tool:edit_mode", "edit_menu.utils_menu.end", tl::to_string (QObject::tr ("Fill Tool"))));
}
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new FillDialog (root, view);
}

View File

@ -63,7 +63,7 @@ public:
menu_entries.push_back (lay::menu_item ("search_replace::show", "search_replace_viewer:edit:view_mode", "edit_menu.utils_group+", tl::to_string (QObject::tr ("Search"))));
}
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
return new SearchReplaceDialog (root, view);
}

View File

@ -23,7 +23,7 @@
#include "gsiDecl.h"
#include "layLayerProperties.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
namespace gsi
{
@ -1227,11 +1227,6 @@ Class<lay::LayerPropertiesNode> decl_LayerPropertiesNode (
"\n"
"@return A bbox in micron units\n"
) +
method_ext ("view", &get_view,
"@brief Gets the view this node lives in\n"
"\n"
"This reference can be nil if the node is a orphan node that lives outside a view."
) +
method ("list_index", &lay::LayerPropertiesNode::list_index,
"@brief Gets the index of the layer properties list that the node lives in\n"
) +

View File

@ -23,13 +23,13 @@
#include "gsiDecl.h"
#include "layMarker.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
namespace gsi
{
static
lay::DMarker *create_marker (lay::LayoutView *view)
lay::DMarker *create_marker (lay::LayoutViewBase *view)
{
return new lay::DMarker (view);
}

View File

@ -25,7 +25,7 @@
#include "gsiDeclBasic.h"
#include "layPlugin.h"
#include "layViewObject.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "layCursor.h"
namespace gsi
@ -40,7 +40,7 @@ namespace gsi
// since PluginBase object are only allowed to be created inside the create_plugin method
// of the factory, this hack is a quick but dirty workaround.
static bool s_in_create_plugin = false;
static lay::LayoutView *sp_view = 0;
static lay::LayoutViewBase *sp_view = 0;
static lay::Dispatcher *sp_dispatcher = 0;
class PluginBase
@ -393,7 +393,7 @@ public:
}
}
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const
virtual lay::Plugin *create_plugin (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
if (f_create_plugin.can_issue ()) {
return create_plugin_gsi (manager, root, view);
@ -402,7 +402,7 @@ public:
}
}
virtual gsi::PluginBase *create_plugin_gsi (db::Manager *manager, lay::Dispatcher *root, lay::LayoutView *view) const
virtual gsi::PluginBase *create_plugin_gsi (db::Manager *manager, lay::Dispatcher *root, lay::LayoutViewBase *view) const
{
// TODO: this is a hack. See notes above at s_in_create_plugin
s_in_create_plugin = true;
@ -410,7 +410,7 @@ public:
sp_dispatcher = root;
gsi::PluginBase *ret = 0;
try {
ret = f_create_plugin.issue<PluginFactoryBase, gsi::PluginBase *, db::Manager *, lay::Dispatcher *, lay::LayoutView *> (&PluginFactoryBase::create_plugin_gsi, manager, root, view);
ret = f_create_plugin.issue<PluginFactoryBase, gsi::PluginBase *, db::Manager *, lay::Dispatcher *, lay::LayoutViewBase *> (&PluginFactoryBase::create_plugin_gsi, manager, root, view);
s_in_create_plugin = false;
sp_view = 0;
sp_dispatcher = 0;

View File

@ -20,8 +20,6 @@
*/
#if defined(HAVE_QT)
#include "layBookmarkList.h"
#include "tlXMLParser.h"
@ -118,6 +116,3 @@ BookmarkList::propose_new_bookmark_name () const
}
}
#endif

View File

@ -20,8 +20,6 @@
*/
#if defined(HAVE_QT)
#ifndef HDR_layBookmarkList
#define HDR_layBookmarkList
@ -208,5 +206,3 @@ private:
} // namespace lay
#endif
#endif // defined(HAVE_QT)

View File

@ -22,7 +22,7 @@
#include "layCellView.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#if defined(HAVE_QT)
# include "layStream.h"
#endif

View File

@ -36,10 +36,10 @@
#include "dbSaveLayoutOptions.h"
#include "dbLoadLayoutOptions.h"
#include "dbInstElement.h"
#include "dbTechnology.h"
#include "gsi.h"
#if defined(HAVE_QT)
# include "layTechnology.h"
# include "tlFileSystemWatcher.h"
#endif

View File

@ -22,7 +22,7 @@
#include "layEditorServiceBase.h"
#include "layViewport.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "laybasicConfig.h"
#include "layConverters.h"
@ -206,7 +206,7 @@ private:
// --------------------------------------------------------------------------------------
EditorServiceBase::EditorServiceBase (LayoutView *view)
EditorServiceBase::EditorServiceBase (LayoutViewBase *view)
: lay::ViewService (view->view_object_widget ()),
lay::Editable (view),
lay::Plugin (view),

View File

@ -46,7 +46,7 @@ public:
/**
* @brief Constructor
*/
EditorServiceBase (lay::LayoutView *view);
EditorServiceBase (lay::LayoutViewBase *view);
/**
* @brief Destructor

View File

@ -86,7 +86,7 @@ Finder::closer (double d)
}
void
Finder::start (lay::LayoutView *view, const lay::CellView &cv, unsigned int cv_index, const std::vector<db::ICplxTrans> &trans, const db::Box &region, int min_level, int max_level, const std::vector<int> &layers)
Finder::start (lay::LayoutViewBase *view, const lay::CellView &cv, unsigned int cv_index, const std::vector<db::ICplxTrans> &trans, const db::Box &region, int min_level, int max_level, const std::vector<int> &layers)
{
m_layers = layers;
m_region = region;
@ -265,7 +265,7 @@ struct LPContextCompareOp
};
bool
ShapeFinder::find (LayoutView *view, const db::DBox &region_mu)
ShapeFinder::find (LayoutViewBase *view, const db::DBox &region_mu)
{
tl::AbsoluteProgress progress (tl::to_string (tr ("Selecting ...")));
progress.set_unit (1000);
@ -330,7 +330,7 @@ ShapeFinder::find (LayoutView *view, const db::DBox &region_mu)
}
bool
ShapeFinder::find (lay::LayoutView *view, const lay::LayerProperties &lprops, const db::DBox &region_mu)
ShapeFinder::find (lay::LayoutViewBase *view, const lay::LayerProperties &lprops, const db::DBox &region_mu)
{
tl::AbsoluteProgress progress (tl::to_string (tr ("Selecting ...")));
progress.set_unit (1000);
@ -349,7 +349,7 @@ ShapeFinder::find (lay::LayoutView *view, const lay::LayerProperties &lprops, co
}
bool
ShapeFinder::find_internal (lay::LayoutView *view, unsigned int cv_index, const std::set<db::properties_id_type> *prop_sel, bool inv_prop_sel, const lay::HierarchyLevelSelection &hier_sel, const std::vector<db::DCplxTrans> &trans_mu, const std::vector<int> &layers, const db::DBox &region_mu)
ShapeFinder::find_internal (lay::LayoutViewBase *view, unsigned int cv_index, const std::set<db::properties_id_type> *prop_sel, bool inv_prop_sel, const lay::HierarchyLevelSelection &hier_sel, const std::vector<db::DCplxTrans> &trans_mu, const std::vector<int> &layers, const db::DBox &region_mu)
{
m_cv_index = cv_index;
@ -624,7 +624,7 @@ InstFinder::InstFinder (bool point_mode, bool top_level_sel, bool full_arrays, b
}
bool
InstFinder::find (lay::LayoutView *view, const db::DBox &region_mu)
InstFinder::find (lay::LayoutViewBase *view, const db::DBox &region_mu)
{
tl::AbsoluteProgress progress (tl::to_string (tr ("Selecting ...")));
progress.set_unit (1000);
@ -641,7 +641,7 @@ InstFinder::find (lay::LayoutView *view, const db::DBox &region_mu)
}
bool
InstFinder::find (LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu)
InstFinder::find (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu)
{
tl::AbsoluteProgress progress (tl::to_string (tr ("Selecting ...")));
progress.set_unit (1000);
@ -655,7 +655,7 @@ InstFinder::find (LayoutView *view, unsigned int cv_index, const db::DCplxTrans
}
bool
InstFinder::find_internal (LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu)
InstFinder::find_internal (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu)
{
const lay::CellView &cv = view->cellview (cv_index);
if (! cv.is_valid ()) {

View File

@ -29,7 +29,7 @@
#include <vector>
#include "tlVector.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "dbBoxConvert.h"
#include "dbLayout.h"
#include "dbBox.h"
@ -136,7 +136,7 @@ protected:
return m_max_level;
}
lay::LayoutView *view () const
lay::LayoutViewBase *view () const
{
return mp_view;
}
@ -153,7 +153,7 @@ protected:
* path of instantiations up to the top cell is maintained and accessible by
* the path() accessor.
*/
void start (LayoutView *view, const lay::CellView &cv, unsigned int cv_index, const std::vector<db::ICplxTrans> &trans, const db::Box &region, int min_level, int max_level, const std::vector<int> &layers = std::vector<int> ());
void start (LayoutViewBase *view, const lay::CellView &cv, unsigned int cv_index, const std::vector<db::ICplxTrans> &trans, const db::Box &region, int min_level, int max_level, const std::vector<int> &layers = std::vector<int> ());
/**
* @brief Provide a basic edge test facility
@ -186,7 +186,7 @@ private:
int m_min_level, m_max_level;
std::vector<db::InstElement> m_path;
const db::Layout *mp_layout;
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
unsigned int m_cv_index;
db::Box m_region;
std::vector<int> m_layers;
@ -214,8 +214,8 @@ public:
ShapeFinder (bool point_mode, bool top_level_sel, db::ShapeIterator::flags_type flags, const std::set<lay::ObjectInstPath> *excludes = 0);
bool find (LayoutView *view, const lay::LayerProperties &lprops, const db::DBox &region_mu);
bool find (LayoutView *view, const db::DBox &region_mu);
bool find (LayoutViewBase *view, const lay::LayerProperties &lprops, const db::DBox &region_mu);
bool find (LayoutViewBase *view, const db::DBox &region_mu);
iterator begin () const
{
@ -262,7 +262,7 @@ protected:
private:
virtual void visit_cell (const db::Cell &cell, const db::Box &search_box, const db::ICplxTrans &t, int /*level*/);
bool find_internal (LayoutView *view,
bool find_internal (LayoutViewBase *view,
unsigned int cv_index,
const std::set<db::properties_id_type> *prop_sel,
bool inv_prop_sel,
@ -300,8 +300,8 @@ public:
InstFinder (bool point_mode, bool top_level_sel, bool full_arrays, bool enclose_inst = true, const std::set<lay::ObjectInstPath> *excludes = 0, bool visible_layers = false);
bool find (LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans, const db::DBox &region_mu);
bool find (LayoutView *view, const db::DBox &region_mu);
bool find (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans, const db::DBox &region_mu);
bool find (LayoutViewBase *view, const db::DBox &region_mu);
iterator begin () const
{
@ -315,7 +315,7 @@ public:
private:
virtual void visit_cell (const db::Cell &cell, const db::Box &search_box, const db::ICplxTrans &t, int level);
bool find_internal (LayoutView *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu);
bool find_internal (LayoutViewBase *view, unsigned int cv_index, const db::DCplxTrans &trans_mu, const db::DBox &region_mu);
unsigned int m_cv_index;
db::cell_index_type m_topcell;

View File

@ -23,7 +23,6 @@
#include "layLayerProperties.h"
#include "layLayoutViewBase.h"
#include "layLayoutView.h"
#include "layConverters.h"
#include "tlXMLParser.h"
#include "tlException.h"
@ -405,7 +404,7 @@ class LayerSourceEval
: public tl::Eval
{
public:
LayerSourceEval (const lay::LayerProperties &lp, const lay::LayoutView *view, bool real)
LayerSourceEval (const lay::LayerProperties &lp, const lay::LayoutViewBase *view, bool real)
: m_lp (lp), mp_view (view), m_real (real)
{
// .. nothing yet ..
@ -416,14 +415,14 @@ public:
return m_lp.source (m_real);
}
const lay::LayoutView *view () const
const lay::LayoutViewBase *view () const
{
return mp_view;
}
private:
const lay::LayerProperties &m_lp;
const lay::LayoutView *mp_view;
const lay::LayoutViewBase *mp_view;
bool m_real;
};
@ -499,7 +498,7 @@ LayerProperties::display_string (const lay::LayoutViewBase *view, bool real, boo
realize_source ();
}
LayerSourceEval eval (*this, view->ui (), real);
LayerSourceEval eval (*this, view, real);
eval.define_function ("N", new LayerSourceEvalFunction ('N', &eval)); // layer name
eval.define_function ("L", new LayerSourceEvalFunction ('L', &eval)); // layer number
eval.define_function ("D", new LayerSourceEvalFunction ('D', &eval)); // datatype
@ -1373,7 +1372,7 @@ expand_wildcard_layers (const LayerPropertiesNode &lp, const LayerPropertiesList
// NOTE: initialization through LayerProperties creates a new ID
lay::LayerPropertiesNode node ((const LayerProperties &) lp);
node.attach_view (view->ui (), list_index);
node.attach_view (view, list_index);
// Build a new ParsedLayerSource combining the transformation, hierarchy levels and
// property selections from the wildcard one and the requested layer source

View File

@ -32,7 +32,7 @@
#include "tlAssert.h"
#include "layLayoutCanvas.h"
#include "layRedrawThread.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "layMarker.h"
#if defined(HAVE_QT)
# include "gtf.h"

View File

@ -39,7 +39,6 @@
#include "layViewOp.h"
#include "layViewObject.h"
#include "layConverters.h"
#include "layGridNet.h"
#include "layMove.h"
#include "layZoomBox.h"
#include "layMouseTracker.h"
@ -236,6 +235,22 @@ struct OpDeleteLayerProps
const double animation_interval = 0.5;
LayoutViewBase::LayoutViewBase (db::Manager *manager, bool editable, lay::Plugin *plugin_parent, unsigned int options)
: lay::Dispatcher (plugin_parent, false /*not standalone*/),
#if defined(HAVE_QT)
mp_widget (0),
#endif
mp_ui (0),
m_editable (editable),
m_options (options),
m_annotation_shapes (manager)
{
// either it's us or the parent has a dispatcher
tl_assert (dispatcher () != 0);
init (manager);
}
#if defined(HAVE_QT)
LayoutViewBase::LayoutViewBase (QWidget *widget, lay::LayoutView *ui, db::Manager *manager, bool editable, lay::Plugin *plugin_parent, unsigned int options)
#else
@ -576,7 +591,7 @@ void LayoutViewBase::create_plugins (const lay::PluginDeclaration *except_this)
lay::Plugin *LayoutViewBase::create_plugin (const lay::PluginDeclaration *cls)
{
lay::Plugin *p = cls->create_plugin (manager (), dispatcher (), ui ());
lay::Plugin *p = cls->create_plugin (manager (), dispatcher (), this);
if (p) {
// unhook the plugin from the script side if created there (prevent GC from destroying it)
@ -1351,7 +1366,7 @@ LayoutViewBase::insert_layer_list (unsigned index, const LayerPropertiesList &pr
clear_layer_selection ();
m_layer_properties_lists.insert (m_layer_properties_lists.begin () + index, new LayerPropertiesList (props));
m_layer_properties_lists [index]->attach_view (ui (), index);
m_layer_properties_lists [index]->attach_view (this, index);
merge_dither_pattern (*m_layer_properties_lists [index]);
m_current_layer_list = index;
@ -1560,7 +1575,7 @@ LayoutViewBase::set_properties (unsigned int index, const LayerPropertiesList &p
return;
} else {
m_layer_properties_lists.push_back (new LayerPropertiesList ());
m_layer_properties_lists.back ()->attach_view (ui (), (unsigned int) (m_layer_properties_lists.size () - 1));
m_layer_properties_lists.back ()->attach_view (this, (unsigned int) (m_layer_properties_lists.size () - 1));
}
}
@ -1579,7 +1594,7 @@ LayoutViewBase::set_properties (unsigned int index, const LayerPropertiesList &p
}
*m_layer_properties_lists [index] = props;
m_layer_properties_lists [index]->attach_view (ui (), index);
m_layer_properties_lists [index]->attach_view (this, index);
merge_dither_pattern (*m_layer_properties_lists [index]);
@ -1997,7 +2012,7 @@ LayoutViewBase::signal_layer_properties_changed ()
// recompute the source
// TODO: this is a side effect of this method - provide a special method for this purpose
for (unsigned int i = 0; i < layer_lists (); ++i) {
m_layer_properties_lists [i]->attach_view (ui (), i);
m_layer_properties_lists [i]->attach_view (this, i);
}
// schedule a redraw request - since the layer views might not have changed, this is necessary
@ -2013,7 +2028,7 @@ LayoutViewBase::signal_prop_ids_changed ()
// recompute the source
// TODO: this is a side effect of this method - provide a special method for this purpose
for (unsigned int i = 0; i < layer_lists (); ++i) {
m_layer_properties_lists [i]->attach_view (ui (), i);
m_layer_properties_lists [i]->attach_view (this, i);
}
}
@ -2278,6 +2293,21 @@ LayoutViewBase::signal_apply_technology (lay::LayoutHandle *layout_handle)
}
}
void
LayoutViewBase::bookmarks (const BookmarkList &b)
{
m_bookmarks = b;
bookmarks_changed ();
}
void
LayoutViewBase::bookmark_view (const std::string &name)
{
DisplayState state (box (), get_min_hier_levels (), get_max_hier_levels (), cellview_list ());
m_bookmarks.add (name, state);
bookmarks_changed ();
}
void
LayoutViewBase::load_layer_props (const std::string &fn)
{
@ -2320,7 +2350,7 @@ LayoutViewBase::do_load_layer_props (const std::string &fn, bool map_cv, int cv_
if (map_cv) {
cv_map.insert (std::make_pair (-1, cv_index));
}
p->attach_view (ui (), p - props.begin ());
p->attach_view (this, p - props.begin ());
p->expand (cv_map, add_default);
}
@ -3236,7 +3266,7 @@ LayoutViewBase::create_initial_layer_props (int cv_index, const std::string &lyp
// expand the wildcards and map to the target cv.
for (std::vector<lay::LayerPropertiesList>::iterator p = props.begin (); p != props.end (); ++p) {
p->attach_view (ui (), p - props.begin ());
p->attach_view (this, p - props.begin ());
p->expand (cv_map, add_missing || !loaded);
}

View File

@ -35,6 +35,7 @@
#include "layLayerProperties.h"
#include "layAnnotationShapes.h"
#include "layBookmarkList.h"
#include "layDispatcher.h"
#include "layLayoutCanvas.h"
#include "layColorPalette.h"
@ -74,8 +75,11 @@ class MouseTracker;
class ZoomService;
class SelectionService;
class MoveService;
class ColorButton;
class ConfigureAction;
#if defined(HAVE_QT)
class LayerControlPanel;
class HierarchyControlPanel;
#endif
/**
* @brief Stores a layer reference to create layers which have been added by some action
@ -156,7 +160,6 @@ class LAYBASIC_PUBLIC LayoutViewBase :
public:
typedef lay::CellView::unspecific_cell_path_type cell_path_type;
typedef lay::CellView::cell_index_type cell_index_type;
typedef std::pair<std::string, DisplayState> bookmark_type;
/**
* @brief Define some options for the view
@ -180,6 +183,11 @@ public:
enum drop_small_cells_cond_type { DSC_Max = 0, DSC_Min = 1, DSC_Sum = 2 };
/**
* @brief Stand-alone Constructor
*/
LayoutViewBase (db::Manager *mgr, bool editable, lay::Plugin *plugin_parent, unsigned int options = (unsigned int) LV_Normal);
/**
* @brief Constructor
*/
@ -798,6 +806,24 @@ public:
*/
void load_layer_props (const std::string &fn, int cv_index, bool add_default);
/**
* @brief Bookmark the current view under the given name
*/
void bookmark_view (const std::string &name);
/**
* @brief Obtain the bookmarks list
*/
const BookmarkList &bookmarks () const
{
return m_bookmarks;
}
/**
* @brief Set the bookmarks list
*/
void bookmarks (const BookmarkList &b);
/**
* @brief Save the screen content to a file
*/
@ -1629,6 +1655,24 @@ public:
return mp_canvas;
}
#if defined(HAVE_QT)
/**
* @brief Gets the layer control panel
*/
virtual lay::LayerControlPanel *control_panel ()
{
return 0;
}
/**
* @brief Gets the hierarchy panel
*/
virtual lay::HierarchyControlPanel *hierarchy_panel ()
{
return 0;
}
#endif
/**
* @brief Get the current viewport
*/
@ -1839,6 +1883,15 @@ public:
*/
virtual void drop_url (const std::string &path_or_url);
/**
* @brief Returns true if the layer control panels model got updated
* Internally used by CellTreeModel to synchronize
*/
virtual bool layer_model_updated ()
{
return false;
}
/**
* @brief Gets a list of all plugins
*/
@ -2308,6 +2361,11 @@ public:
return (unsigned int) m_rdbs.size ();
}
/**
* @brief Open the RDB browser for a given database and associated cv index
*/
virtual void open_rdb_browser (int /*rdb_index*/, int /*cv_index*/) { }
/**
* @brief An event signalling a change in the marker database list
*
@ -2369,6 +2427,11 @@ public:
return (unsigned int) m_l2ndbs.size ();
}
/**
* @brief Open the L2NDB browser for a given database and associated cv index
*/
virtual void open_l2ndb_browser (int /*l2ndb_index*/, int /*cv_index*/) { }
/**
* @brief An event signalling a change in the netlist database list
*
@ -2691,6 +2754,8 @@ private:
std::vector <DisplayState> m_display_states;
unsigned int m_display_state_ptr;
BookmarkList m_bookmarks;
std::vector<lay::LayerPropertiesList *> m_layer_properties_lists;
unsigned int m_current_layer_list;
@ -2792,6 +2857,8 @@ protected:
virtual void update_content_for_cv (int cv_index);
virtual bool set_hier_levels_basic (std::pair<int, int> l);
virtual void bookmarks_changed () { }
void ensure_layer_selected ();
void enable_active_cellview_changed_event (bool enable, bool silent = false);

View File

@ -29,7 +29,7 @@
#include "layCanvasPlane.h"
#include "layViewOp.h"
#include "layRenderer.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "tlAssert.h"
namespace lay
@ -188,7 +188,7 @@ void render_cell_inst (const db::Layout &layout, const db::CellInstArray &inst,
// ------------------------------------------------------------------------
MarkerBase::MarkerBase (lay::LayoutView *view)
MarkerBase::MarkerBase (lay::LayoutViewBase *view)
: lay::ViewObject (view->view_object_widget ()),
m_line_width (-1), m_vertex_size (-1), m_halo (-1), m_text_enabled (true), m_vertex_shape (lay::ViewOp::Rect), m_line_style (-1), m_dither_pattern (-1), m_frame_pattern (0), mp_view (view)
{
@ -372,7 +372,7 @@ MarkerBase::get_bitmaps (const Viewport & /*vp*/, ViewObjectCanvas &canvas, lay:
// ------------------------------------------------------------------------
GenericMarkerBase::GenericMarkerBase (lay::LayoutView *view, unsigned int cv_index)
GenericMarkerBase::GenericMarkerBase (lay::LayoutViewBase *view, unsigned int cv_index)
: MarkerBase (view), mp_trans_vector (0), mp_view (view), m_cv_index (cv_index)
{
// .. nothing yet ..
@ -496,7 +496,7 @@ GenericMarkerBase::dbu () const
// ------------------------------------------------------------------------
InstanceMarker::InstanceMarker (LayoutView *view, unsigned int cv_index, bool draw_outline, size_t max_shapes)
InstanceMarker::InstanceMarker (LayoutViewBase *view, unsigned int cv_index, bool draw_outline, size_t max_shapes)
: GenericMarkerBase (view, cv_index), m_draw_outline (draw_outline), m_max_shapes (max_shapes), m_inst ()
{
// .. nothing yet ..
@ -576,7 +576,7 @@ InstanceMarker::item_bbox () const
// ------------------------------------------------------------------------
ShapeMarker::ShapeMarker (LayoutView *view, unsigned int cv_index)
ShapeMarker::ShapeMarker (LayoutViewBase *view, unsigned int cv_index)
: GenericMarkerBase (view, cv_index), m_shape ()
{
// .. nothing yet ..
@ -643,7 +643,7 @@ ShapeMarker::item_bbox () const
// ------------------------------------------------------------------------
Marker::Marker (lay::LayoutView *view, unsigned int cv_index, bool draw_outline, size_t max_shapes)
Marker::Marker (lay::LayoutViewBase *view, unsigned int cv_index, bool draw_outline, size_t max_shapes)
: GenericMarkerBase (view, cv_index), m_draw_outline (draw_outline), m_max_shapes (max_shapes)
{
m_type = None;
@ -1135,7 +1135,7 @@ Marker::render (const Viewport &vp, ViewObjectCanvas &canvas)
// ------------------------------------------------------------------------
DMarker::DMarker (LayoutView *view)
DMarker::DMarker (LayoutViewBase *view)
: MarkerBase (view), mp_view (view)
{
m_type = None;

View File

@ -44,7 +44,7 @@
namespace lay
{
class LayoutView;
class LayoutViewBase;
/**
* @brief The marker base class
@ -59,7 +59,7 @@ public:
/**
* @brief The constructor
*/
MarkerBase (lay::LayoutView *view);
MarkerBase (lay::LayoutViewBase *view);
/**
* @brief Get the color by which the marker is drawn
@ -232,7 +232,7 @@ protected:
bool m_text_enabled;
lay::ViewOp::Shape m_vertex_shape;
int m_line_style, m_dither_pattern, m_frame_pattern;
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
};
/**
@ -252,7 +252,7 @@ public:
/**
* @brief The constructor
*/
GenericMarkerBase (lay::LayoutView *view, unsigned int cv_index);
GenericMarkerBase (lay::LayoutViewBase *view, unsigned int cv_index);
/**
* @brief The destructor
@ -321,7 +321,7 @@ public:
/**
* @brief Gets the view object
*/
lay::LayoutView *view () const
lay::LayoutViewBase *view () const
{
return mp_view;
}
@ -344,7 +344,7 @@ public:
private:
db::CplxTrans m_trans;
std::vector<db::DCplxTrans> *mp_trans_vector;
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
unsigned int m_cv_index;
/**
@ -367,7 +367,7 @@ public:
/**
* @brief The constructor
*/
ShapeMarker (lay::LayoutView *view, unsigned int cv_index);
ShapeMarker (lay::LayoutViewBase *view, unsigned int cv_index);
/**
* @brief The destructor
@ -418,7 +418,7 @@ public:
* @param draw_outline True to have instances drawing their outline
* @param max_shapes The maximum number of shapes to draw for instances (just a box is drawn if more shapes are present)
*/
InstanceMarker (lay::LayoutView *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0);
InstanceMarker (lay::LayoutViewBase *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0);
/**
* @brief The destructor
@ -508,7 +508,7 @@ public:
* @param draw_outline True to have instances drawing their outline
* @param max_shapes The maximum number of shapes to draw for instances (just a box is drawn if more shapes are present)
*/
Marker (lay::LayoutView *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0);
Marker (lay::LayoutViewBase *view, unsigned int cv_index, bool draw_outline = true, size_t max_shapes = 0);
/**
* @brief The destructor
@ -743,7 +743,7 @@ public:
/**
* @brief The constructor
*/
DMarker (lay::LayoutView *view);
DMarker (lay::LayoutViewBase *view);
/**
* @brief The destructor
@ -806,7 +806,7 @@ private:
void *any;
} m_object;
lay::LayoutView *mp_view;
lay::LayoutViewBase *mp_view;
};
}

View File

@ -23,7 +23,7 @@
#include "layMouseTracker.h"
#include "layLayoutCanvas.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
namespace lay
{

View File

@ -24,7 +24,7 @@
#include "layMove.h"
#include "layEditable.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "laySelector.h"
#include "laybasicConfig.h"

View File

@ -26,7 +26,6 @@
#include "layObjectInstPath.h"
#include "layCellView.h"
#include "layLayoutView.h"
#include "tlException.h"
namespace lay {

View File

@ -22,7 +22,7 @@
#include "layParsedLayerSource.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "tlString.h"
#include "tlGlobPattern.h"

View File

@ -48,7 +48,7 @@ namespace lay
class Plugin;
class Dispatcher;
class LayoutView;
class LayoutViewBase;
class ViewService;
class Editable;
class Drawing;
@ -302,7 +302,7 @@ public:
* This method may return 0 for "dummy" plugins that just register menu entries
* or configuration options.
*/
virtual lay::Plugin *create_plugin (db::Manager * /*manager*/, lay::Dispatcher * /*dispatcher*/, lay::LayoutView * /*view*/) const
virtual lay::Plugin *create_plugin (db::Manager * /*manager*/, lay::Dispatcher * /*dispatcher*/, lay::LayoutViewBase * /*view*/) const
{
return 0;
}
@ -329,7 +329,7 @@ public:
*
* The new pages are returned in the "pages" vector. The layout view will take ownership of these pages.
*/
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> & /*pages*/, lay::LayoutView * /*view*/, lay::Dispatcher * /*dispatcher*/) const
virtual void get_editor_options_pages (std::vector<lay::EditorOptionsPage *> & /*pages*/, lay::LayoutViewBase * /*view*/, lay::Dispatcher * /*dispatcher*/) const
{
// .. no pages in the default implementation ..
}

View File

@ -33,7 +33,6 @@ namespace lay
{
class Dispatcher;
class EditorOptionsPage;
/**
* @brief The base class for configuration pages

View File

@ -32,7 +32,7 @@
#include "dbTrans.h"
#include "dbLayout.h"
#include "layRenderer.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "layRedrawThreadCanvas.h"
#include "layRedrawLayerInfo.h"
#include "layCanvasPlane.h"

View File

@ -70,7 +70,7 @@ RedrawThreadWorker::RedrawThreadWorker (RedrawThread *redraw_thread)
m_default_text_size = 0.0;
m_drop_small_cells = false;
m_drop_small_cells_value = 0;
m_drop_small_cells_cond = lay::LayoutView::DSC_Min;
m_drop_small_cells_cond = lay::LayoutViewBase::DSC_Min;
m_draw_array_border_instances = false;
m_abstract_mode_width = 0;
m_child_context_enabled = false;
@ -2097,9 +2097,9 @@ RedrawThreadWorker::drop_cell (const db::Cell &cell, const db::CplxTrans &trans)
db::DBox bbox = trans * cell.bbox ();
double value = 0;
if (m_drop_small_cells_cond == lay::LayoutView::DSC_Min) {
if (m_drop_small_cells_cond == lay::LayoutViewBase::DSC_Min) {
value = std::min (bbox.width (), bbox.height ());
} else if (m_drop_small_cells_cond == lay::LayoutView::DSC_Max) {
} else if (m_drop_small_cells_cond == lay::LayoutViewBase::DSC_Max) {
value = std::max (bbox.width (), bbox.height ());
} else {
value = bbox.width () + bbox.height ();

View File

@ -25,7 +25,7 @@
#define HDR_layRedrawThreadWorker
#include "dbLayout.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "tlThreadedWorkers.h"
#include "tlTimer.h"
@ -221,7 +221,7 @@ private:
double m_default_text_size;
bool m_drop_small_cells;
unsigned int m_drop_small_cells_value;
lay::LayoutView::drop_small_cells_cond_type m_drop_small_cells_cond;
lay::LayoutViewBase::drop_small_cells_cond_type m_drop_small_cells_cond;
bool m_draw_array_border_instances;
double m_abstract_mode_width;
bool m_child_context_enabled;
@ -231,7 +231,7 @@ private:
std::set <std::pair <db::CplxTrans, db::cell_index_type>, lay::CellVariantCacheCompare> *mp_cell_var_cache;
unsigned int m_cache_hits, m_cache_misses;
std::set <std::pair <db::DCplxTrans, int> > m_box_variants;
std::vector <std::set <lay::LayoutView::cell_index_type> > m_hidden_cells;
std::vector <std::set <lay::LayoutViewBase::cell_index_type> > m_hidden_cells;
std::vector <lay::CellView> m_cellviews;
const db::Layout *mp_layout;
int m_cv_index;

View File

@ -24,7 +24,7 @@
#include "laySelector.h"
#include "layRubberBox.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "tlLog.h"
#include "tlException.h"

View File

@ -23,7 +23,7 @@
#include "laySnap.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "dbEdge.h"
@ -282,7 +282,7 @@ public:
* This will run the finder on the given view.
* "search_range" is the search range in micron units.
*/
void find (lay::LayoutView *view, double search_range)
void find (lay::LayoutViewBase *view, double search_range)
{
if (! view) {
return;
@ -586,7 +586,7 @@ private:
}
void
do_find (lay::LayoutView *view, int cv_index, const db::Cell &cell, unsigned int l, int min_level, int max_level, const db::CplxTrans &t)
do_find (lay::LayoutViewBase *view, int cv_index, const db::Cell &cell, unsigned int l, int min_level, int max_level, const db::CplxTrans &t)
{
db::Box touch_box = t.inverted () * m_region;
@ -727,7 +727,7 @@ private:
};
static PointSnapToObjectResult
do_obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double snap_range, const std::vector <db::DEdge> &cutlines)
do_obj_snap (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range, const std::vector <db::DEdge> &cutlines)
{
db::DPoint dp (pt);
@ -792,7 +792,7 @@ do_obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &gri
}
static TwoPointSnapToObjectResult
do_obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range, const std::vector <db::DEdge> &cutlines)
do_obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range, const std::vector <db::DEdge> &cutlines)
{
db::DPoint dp1 (pt1);
db::DPoint dp2 (pt2);
@ -915,13 +915,13 @@ make_cutlines (lay::angle_constraint_type snap_mode, const db::DPoint &p1, std::
}
PointSnapToObjectResult
obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double snap_range)
obj_snap (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range)
{
return do_obj_snap (view, pt, grid, snap_range, std::vector<db::DEdge> ());
}
PointSnapToObjectResult
obj_snap (lay::LayoutView *view, const db::DPoint &p1, const db::DPoint &p2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double snap_range)
obj_snap (lay::LayoutViewBase *view, const db::DPoint &p1, const db::DPoint &p2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double snap_range)
{
std::vector <db::DEdge> cutlines;
make_cutlines (snap_mode, p1, cutlines);
@ -929,19 +929,19 @@ obj_snap (lay::LayoutView *view, const db::DPoint &p1, const db::DPoint &p2, con
}
TwoPointSnapToObjectResult
obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range)
obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range)
{
return obj_snap2 (view, pt, pt, grid, min_search_range, max_search_range);
}
TwoPointSnapToObjectResult
obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range)
obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range)
{
return obj_snap2 (view, pt, pt, grid, ac, min_search_range, max_search_range);
}
TwoPointSnapToObjectResult
obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range)
obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range)
{
db::DPoint dp1 = lay::snap_xy (pt1, grid);
db::DPoint dp2 = lay::snap_xy (pt2, grid);
@ -950,7 +950,7 @@ obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2,
}
TwoPointSnapToObjectResult
obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double min_search_range, double max_search_range)
obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type snap_mode, double min_search_range, double max_search_range)
{
db::DPoint dp1 = lay::snap_xy (pt1, grid);
db::DPoint dp2 = lay::snap_xy (pt2, grid);

View File

@ -41,7 +41,7 @@
namespace lay
{
class LayoutView;
class LayoutViewBase;
/**
* @brief An angle constraint type
@ -154,7 +154,7 @@ namespace lay
* @param grid Either (0,0) to disable grid snapping or a (gx,gy) value for the (potentially anisotropic grid)
* @param snap_range The search range for objects
*/
LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double snap_range);
LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double snap_range);
/**
* @brief combined grid-, projection- and object snapping provided to implementing "magnetic features"
@ -162,7 +162,7 @@ namespace lay
* This is a convenience method that creates the projection axes from a reference point and an angle mode.
* "pr" is the reference point, "pt" is the point to snap.
*/
LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutView *view, const db::DPoint &pr, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double snap_range);
LAYBASIC_PUBLIC PointSnapToObjectResult obj_snap (lay::LayoutViewBase *view, const db::DPoint &pr, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double snap_range);
/**
* @brief A structure describing the snap result for a two-sided object snap (distance measurement)
@ -208,7 +208,7 @@ namespace lay
* This method basically implements "auto measure". The first value of the returned pair
* is true if such an edge could be found. Otherwise it's false.
*/
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range);
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, double min_search_range, double max_search_range);
/**
* @brief Same than obj_snap, but delivers two points on two opposite sides of the initial points
@ -218,14 +218,14 @@ namespace lay
*
* This version accepts two points defining different search regions for first and second edge.
*/
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range);
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, double min_search_range, double max_search_range);
/**
* @brief Same than the previous obj_snap2, but allows specification of an angle constraint
*
* Measurements will be confined to the direction specified.
*/
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range);
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range);
/**
* @brief Same than the previous obj_snap2, but allows specification of an angle constraint
@ -234,7 +234,7 @@ namespace lay
*
* This version accepts two points defining different search regions for first and second edge.
*/
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutView *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range);
LAYBASIC_PUBLIC TwoPointSnapToObjectResult obj_snap2 (lay::LayoutViewBase *view, const db::DPoint &pt1, const db::DPoint &pt2, const db::DVector &grid, lay::angle_constraint_type ac, double min_search_range, double max_search_range);
/**
* @brief Reduce a given vector according to the angle constraint

View File

@ -25,7 +25,6 @@
#include "layStream.h"
#include "layPlugin.h"
#include "laybasicConfig.h"
#include "layTechnology.h"
#include "dbStream.h"
#include "dbLoadLayoutOptions.h"
#include "dbSaveLayoutOptions.h"

View File

@ -23,7 +23,7 @@
#include "layZoomBox.h"
#include "layRubberBox.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
namespace lay
{

View File

@ -6,335 +6,135 @@ include($$PWD/../../lib.pri)
DEFINES += MAKE_LAYBASIC_LIBRARY
!equals(HAVE_QT, "0") {
!equals(HAVE_QT, 0) {
FORMS = \
AlignCellOptionsDialog.ui \
BookmarkManagementForm.ui \
BrowseInstancesConfigPage.ui \
BrowseInstancesForm.ui \
BrowserDialog.ui \
BrowserPanel.ui \
BrowseShapesConfigPage.ui \
BrowseShapesForm.ui \
CellSelectionForm.ui \
ClearLayerModeDialog.ui \
ConfigurationDialog.ui \
CopyCellModeDialog.ui \
DeleteCellModeDialog.ui \
DuplicateLayerDialog.ui \
EditStipplesForm.ui \
FlattenInstOptionsDialog.ui \
GridNetConfigPage.ui \
LayerMappingWidget.ui \
LayerSourceDialog.ui \
LayoutProperties.ui \
LayoutViewConfigPage1.ui \
LayoutViewConfigPage2a.ui \
LayoutViewConfigPage2b.ui \
LayoutViewConfigPage2c.ui \
LayoutViewConfigPage2d.ui \
LayoutViewConfigPage3a.ui \
LayoutViewConfigPage3b.ui \
LayoutViewConfigPage3c.ui \
LayoutViewConfigPage3f.ui \
LayoutViewConfigPage4.ui \
LayoutViewConfigPage5.ui \
LayoutViewConfigPage6.ui \
LayoutViewConfigPage7.ui \
LayoutViewConfigPage.ui \
LibraryCellSelectionForm.ui \
LoadLayoutOptionsDialog.ui \
MarkerBrowserConfigPage2.ui \
MarkerBrowserConfigPage.ui \
MarkerBrowserDialog.ui \
MarkerBrowserPage.ui \
MarkerBrowserSnapshotView.ui \
MoveOptionsDialog.ui \
MoveToOptionsDialog.ui \
NewCellPropertiesDialog.ui \
NewLayerPropertiesDialog.ui \
NewLayoutPropertiesDialog.ui \
OpenLayoutModeDialog.ui \
PropertiesDialog.ui \
RenameCellDialog.ui \
ReplaceCellOptionsDialog.ui \
SaveLayoutOptionsDialog.ui \
SaveLayoutAsOptionsDialog.ui \
SelectStippleForm.ui \
TipDialog.ui \
UserPropertiesForm.ui \
UserPropertiesEditForm.ui \
SpecificLoadLayoutOptionsDialog.ui \
SelectLineStyleForm.ui \
LayoutViewConfigPage6a.ui \
EditLineStylesForm.ui \
NetlistBrowserPage.ui \
NetlistBrowserConfigPage.ui \
NetlistBrowserConfigPage2.ui \
NetlistBrowserDialog.ui \
NetInfoDialog.ui \
NetExportDialog.ui \
SelectCellViewForm.ui \
LayoutStatistics.ui \
RESOURCES = \
laybasicResources.qrc \
layLayoutStatistics.qrc \
SOURCES = \
gtf.cc \
layPluginConfigPage.cc \
layPropertiesDialog.cc \
layProperties.cc \
layAbstractMenu.cc \
layDragDropData.cc \
layCursor.cc \
HEADERS = \
gtf.h \
layPluginConfigPage.h \
layPropertiesDialog.h \
layProperties.h \
layAbstractMenu.h \
layDragDropData.h \
layCursor.h \
}
# Disabled without Qt:
SOURCES = \
gsiDeclLayDialogs.cc \
gsiDeclLayMenu.cc \
gsiDeclLayNetlistBrowserDialog.cc \
gsiDeclLayStream.cc \
gtf.cc \
layAbstractMenu.cc \
layBackgroundAwareTreeStyle.cc \
layBookmarkList.cc \
layBookmarkManagementForm.cc \
layBookmarksView.cc \
layBrowseInstancesForm.cc \
layBrowseShapesForm.cc \
layBrowser.cc \
layBrowserDialog.cc \
layBrowserPanel.cc \
layBusy.cc \
layCellSelectionForm.cc \
layCellTreeModel.cc \
layConfigurationDialog.cc \
layCursor.cc \
layDialogs.cc \
layDragDropData.cc \
layEditLineStyleWidget.cc \
layEditLineStylesForm.cc \
layEditStippleWidget.cc \
layEditStipplesForm.cc \
layEditorOptionsFrame.cc \
layEditorOptionsPage.cc \
layEditorOptionsPages.cc \
layFileDialog.cc \
layGenericSyntaxHighlighter.cc \
layGridNetConfigPage.cc \
layHierarchyControlPanel.cc \
layIndexedNetlistModel.cc \
layItemDelegates.cc \
layLayerControlPanel.cc \
layLayerMappingWidget.cc \
layLayerToolbox.cc \
layLayerTreeModel.cc \
layLayoutPropertiesForm.cc \
layLayoutStatisticsForm.cc \
layLayoutViewConfigPages.cc \
layLayoutViewFunctions.cc \
layLibrariesView.cc \
layLoadLayoutOptionsDialog.cc \
layNetExportDialog.cc \
layNetInfoDialog.cc \
layNetlistBrowser.cc \
layNetlistBrowserDialog.cc \
layNetlistBrowserModel.cc \
layNetlistBrowserPage.cc \
layNetlistBrowserTreeModel.cc \
layNetlistCrossReferenceModel.cc \
layPluginConfigPage.cc \
layProperties.cc \
layPropertiesDialog.cc \
layQtTools.cc \
laySaveLayoutOptionsDialog.cc \
laySelectCellViewForm.cc \
laySelectLineStyleForm.cc \
laySelectStippleForm.cc \
layStream.cc \
layTechnology.cc \
layTipDialog.cc \
layWidgets.cc \
rdbInfoWidget.cc \
rdbMarkerBrowser.cc \
rdbMarkerBrowserDialog.cc \
rdbMarkerBrowserPage.cc \
# Disabled without Qt:
HEADERS = \
gtf.h \
layAbstractMenu.h \
layBackgroundAwareTreeStyle.h \
layBitmap.h \
layBookmarkList.h \
layBookmarkManagementForm.h \
layBookmarksView.h \
layBrowseInstancesForm.h \
layBrowseShapesForm.h \
layBrowser.h \
layBrowserDialog.h \
layBrowserPanel.h \
layBusy.h \
layCellSelectionForm.h \
layCellTreeModel.h \
layConfigurationDialog.h \
layColor.h \
layCursor.h \
layDialogs.h \
layDragDropData.h \
layEditLineStyleWidget.h \
layEditLineStylesForm.h \
layEditStippleWidget.h \
layEditStipplesForm.h \
layEditorOptionsFrame.h \
layEditorOptionsPage.h \
layEditorOptionsPages.h \
layFileDialog.h \
layGenericSyntaxHighlighter.h \
layGridNetConfigPage.h \
layHierarchyControlPanel.h \
layIndexedNetlistModel.h \
layItemDelegates.h \
layLayerControlPanel.h \
layLayerMappingWidget.h \
layLayerToolbox.h \
layLayerTreeModel.h \
layLayoutPropertiesForm.h \
layLayoutStatisticsForm.h \
layLayoutViewConfigPages.h \
layLayoutViewFunctions.h \
layLibrariesView.h \
layLoadLayoutOptionsDialog.h \
layNetExportDialog.h \
layNetInfoDialog.h \
layNetlistBrowser.h \
layNetlistBrowserDialog.h \
layNetlistBrowserModel.h \
layNetlistBrowserPage.h \
layNetlistBrowserTreeModel.h \
layNetlistCrossReferenceModel.h \
layPluginConfigPage.h \
layProperties.h \
layPropertiesDialog.h \
layQtTools.h \
laySaveLayoutOptionsDialog.h \
laySelectCellViewForm.h \
laySelectLineStyleForm.h \
laySelectStippleForm.h \
layStream.h \
layTechnology.h \
layTipDialog.h \
layWidgets.h \
laybasicConfig.h \
rdbInfoWidget.h \
rdbMarkerBrowser.h \
rdbMarkerBrowserDialog.h \
rdbMarkerBrowserPage.h \
# Enabled without Qt:
SOURCES += \
gsiDeclLayLayers.cc \
gsiDeclLayLayoutView.cc \
gsiDeclLayMarker.cc \
gsiDeclLayPlugin.cc \
gsiDeclLayPixelBuffer.cc \
laybasicForceLink.cc \
layAnnotationShapes.cc \
layBitmap.cc \
layBitmapRenderer.cc \
layBitmapsToImage.cc \
layCellView.cc \
layColor.cc \
layColorPalette.cc \
layConverters.cc \
layDispatcher.cc \
layDisplayState.cc \
layDitherPattern.cc \
layDrawing.cc \
layEditable.cc \
layEditorServiceBase.cc \
layFinder.cc \
layGridNet.cc \
layFixedFont.cc \
layLayoutCanvas.cc \
layLayoutView.cc \
layLineStylePalette.cc \
layLineStyles.cc \
layMarker.cc \
layMouseTracker.cc \
layMove.cc \
layNetColorizer.cc \
layObjectInstPath.cc \
layParsedLayerSource.cc \
layPixelBuffer.cc \
layPixelBufferPainter.cc \
layPlugin.cc \
layRedrawLayerInfo.cc \
layRedrawThread.cc \
layRedrawThreadCanvas.cc \
layRedrawThreadWorker.cc \
layRenderer.cc \
layRubberBox.cc \
laySelector.cc \
laySnap.cc \
layStipplePalette.cc \
layCanvasPlane.cc \
layLayoutViewBase.cc \
layLayerProperties.cc \
layViewObject.cc \
layViewOp.cc \
layViewport.cc \
layZoomBox.cc \
# Enabled without Qt:
gsiDeclLayLayers.cc \
gsiDeclLayLayoutViewBase.cc \
gsiDeclLayMarker.cc \
gsiDeclLayPlugin.cc \
gsiDeclLayPixelBuffer.cc \
laybasicForceLink.cc \
layAnnotationShapes.cc \
layBitmap.cc \
layBitmapRenderer.cc \
layBitmapsToImage.cc \
layBookmarkList.cc \
layCellView.cc \
layColor.cc \
layColorPalette.cc \
layConverters.cc \
layDispatcher.cc \
layDisplayState.cc \
layDitherPattern.cc \
layDrawing.cc \
layEditable.cc \
layEditorServiceBase.cc \
layFinder.cc \
layFixedFont.cc \
layLayoutCanvas.cc \
layLineStylePalette.cc \
layLineStyles.cc \
layMarker.cc \
layMouseTracker.cc \
layMove.cc \
layNetColorizer.cc \
layObjectInstPath.cc \
layParsedLayerSource.cc \
layPixelBuffer.cc \
layPixelBufferPainter.cc \
layPlugin.cc \
layRedrawLayerInfo.cc \
layRedrawThread.cc \
layRedrawThreadCanvas.cc \
layRedrawThreadWorker.cc \
layRenderer.cc \
layRubberBox.cc \
laySelector.cc \
laySnap.cc \
layStream.cc \
layStipplePalette.cc \
layCanvasPlane.cc \
layLayoutViewBase.cc \
layLayerProperties.cc \
layViewObject.cc \
layViewOp.cc \
layViewport.cc \
layZoomBox.cc \
HEADERS += \
laybasicForceLink.h \
layAnnotationShapes.h \
layBitmap.h \
layBitmapRenderer.h \
layBitmapsToImage.h \
layCellView.h \
layColorPalette.h \
layConverters.h \
layDispatcher.h \
layDisplayState.h \
layDitherPattern.h \
layDrawing.h \
layEditable.h \
layEditorServiceBase.h \
layLayoutCanvas.h \
layLayoutView.h \
layFinder.h \
layFixedFont.h \
layGridNet.h \
layLayoutViewBase.h \
layLineStylePalette.h \
layLineStyles.h \
layMarker.h \
layMouseTracker.h \
layMove.h \
layNetColorizer.h \
layObjectInstPath.h \
layParsedLayerSource.h \
layPixelBuffer.h \
layPixelBufferPainter.h \
layPlugin.h \
layRedrawLayerInfo.h \
layRedrawThread.h \
layRedrawThreadCanvas.h \
layRedrawThreadWorker.h \
layRenderer.h \
layRubberBox.h \
laySelector.h \
laySnap.h \
layStipplePalette.h \
layLayerProperties.h \
layCanvasPlane.h \
layViewObject.h \
layViewOp.h \
layViewport.h \
layZoomBox.h \
laybasicCommon.h \
laybasicConfig.h \
laybasicForceLink.h \
layAnnotationShapes.h \
layBitmap.h \
layBitmapRenderer.h \
layBitmapsToImage.h \
layBookmarkList.h \
layCellView.h \
layColorPalette.h \
layColor.h \
layConverters.h \
layDispatcher.h \
layDisplayState.h \
layDitherPattern.h \
layDrawing.h \
layEditable.h \
layEditorServiceBase.h \
layLayoutCanvas.h \
layFinder.h \
layFixedFont.h \
layLayoutViewBase.h \
layLineStylePalette.h \
layLineStyles.h \
layMarker.h \
layMouseTracker.h \
layMove.h \
layNetColorizer.h \
layObjectInstPath.h \
layParsedLayerSource.h \
layPixelBuffer.h \
layPixelBufferPainter.h \
layPlugin.h \
layRedrawLayerInfo.h \
layRedrawThread.h \
layRedrawThreadCanvas.h \
layRedrawThreadWorker.h \
layRenderer.h \
layRubberBox.h \
laySelector.h \
laySnap.h \
layStream.h \
layStipplePalette.h \
layLayerProperties.h \
layCanvasPlane.h \
layViewObject.h \
layViewOp.h \
layViewport.h \
layZoomBox.h \
laybasicCommon.h \
INCLUDEPATH += $$TL_INC $$GSI_INC $$DB_INC $$RDB_INC

View File

@ -23,7 +23,7 @@
#include "layLayerProperties.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "tlXMLParser.h"
#include "tlUnitTest.h"
#include "dbLayout.h"
@ -1304,7 +1304,7 @@ TEST (16)
lay::LayerPropertiesList list;
db::Manager mgr (true);
lay::LayoutView view (&mgr, is_editable (), 0);
lay::LayoutViewBase view (&mgr, is_editable (), 0);
list.attach_view (&view, 0);
int cv1 = view.create_layout ("", true, false);
@ -1356,7 +1356,7 @@ TEST (17)
lay::LayerPropertiesList list;
db::Manager mgr (true);
lay::LayoutView view (&mgr, is_editable (), 0);
lay::LayoutViewBase view (&mgr, is_editable (), 0);
list.attach_view (&view, 0);
int cv1 = view.create_layout ("", true, false);
@ -1423,7 +1423,7 @@ TEST (18)
lay::LayerPropertiesList list;
db::Manager mgr (true);
lay::LayoutView view (&mgr, is_editable (), 0);
lay::LayoutViewBase view (&mgr, is_editable (), 0);
list.attach_view (&view, 0);
int cv1 = view.create_layout ("", true, false);
@ -1491,7 +1491,7 @@ TEST (19)
lay::LayerPropertiesList list;
db::Manager mgr (true);
lay::LayoutView view (&mgr, is_editable (), 0);
lay::LayoutViewBase view (&mgr, is_editable (), 0);
list.attach_view (&view, 0);
int cv1 = view.create_layout ("", true, false);
@ -1560,7 +1560,7 @@ TEST (20)
lay::LayerPropertiesList list;
db::Manager mgr (true);
lay::LayoutView view (&mgr, is_editable (), 0);
lay::LayoutViewBase view (&mgr, is_editable (), 0);
list.attach_view (&view, 0);
int cv1 = view.create_layout ("", true, false);
@ -1632,7 +1632,7 @@ TEST (21)
lay::LayerPropertiesList list;
db::Manager mgr (true);
lay::LayoutView view (&mgr, is_editable (), 0);
lay::LayoutViewBase view (&mgr, is_editable (), 0);
list.attach_view (&view, 0);
int cv1 = view.create_layout ("", true, false);

View File

@ -21,14 +21,14 @@
*/
#include "laySnap.h"
#include "layLayoutView.h"
#include "layLayoutViewBase.h"
#include "tlUnitTest.h"
TEST(1)
{
db::Manager mgr (true);
lay::LayoutView view (&mgr, is_editable (), 0);
lay::LayoutViewBase view (&mgr, is_editable (), 0);
int cv1 = view.create_layout ("", true, false);
db::Layout &ly1 = view.cellview (cv1)->layout ();

View File

@ -14,19 +14,10 @@ SOURCES = \
layLayerProperties.cc \
layParsedLayerSource.cc \
layPixelBufferTests.cc \
layLayoutViewTests.cc \
layRenderer.cc \
layAbstractMenuTests.cc \
laySnapTests.cc
!equals(HAVE_QT, "0") {
SOURCES += \
layNetlistBrowserModelTests.cc \
layNetlistBrowserTreeModelTests.cc \
}
INCLUDEPATH += $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC $$OUT_PWD/../laybasic
DEPENDPATH += $$TL_INC $$LAYBASIC_INC $$DB_INC $$GSI_INC $$OUT_PWD/../laybasic

6
src/layui/layui.pro Normal file
View File

@ -0,0 +1,6 @@
TEMPLATE = subdirs
SUBDIRS = layui unit_tests
unit_tests.depends += layui

Some files were not shown because too many files have changed in this diff Show More