add small dev/test utility for working on constraint packer

This commit is contained in:
Paul Davis 2020-05-22 08:46:37 -06:00
parent 1c3e743d2a
commit 606866ea00
2 changed files with 37 additions and 0 deletions

View File

@ -0,0 +1,27 @@
#include <gtkmm/adjustment.h>
#include <gtkmm/main.h>
#include <gtkmm/window.h>
#include "canvas/canvas.h"
#include "canvas/constraint_packer.h"
using namespace ArdourCanvas;
using namespace Gtk;
int
main (int argc, char* argv[])
{
Gtk::Main app (&argc, &argv);
Gtk::Window win;
Gtk::Adjustment hadj (0, 0, 1000, 1, 10);
Gtk::Adjustment vadj (0, 0, 1000, 1, 10);
GtkCanvasViewport cview (hadj, vadj);
win.add (cview);
win.show_all ();
app.run ();
return 0;
}

View File

@ -34,6 +34,7 @@ canvas_sources = [
'canvas.cc',
'circle.cc',
'container.cc',
'constraint_packer.cc',
'curve.cc',
'debug.cc',
'item.cc',
@ -161,6 +162,15 @@ def build(bld):
manual_testobj.target = target
manual_testobj.install_path = ''
constraint_test_src = [ 'constraint_test.cc' ]
constraint_test = bld (features = 'cxx cxxprogram')
constraint_test.source = constraint_test_src
constraint_test.includes = obj.includes + ['../pbd', '../gtkmm2ext']
constraint_test.use = [ 'GTKMM', 'libcanvas', 'libgtkmm2ext' ]
constraint_test.name = 'constraint_test'
constraint_test.target = 'constraint_test'
constraint_test.install_path = ''
def shutdown():
autowaf.shutdown()