add small dev/test utility for working on constraint packer
This commit is contained in:
parent
1c3e743d2a
commit
606866ea00
27
libs/canvas/constraint_test.cc
Normal file
27
libs/canvas/constraint_test.cc
Normal 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;
|
||||||
|
}
|
|
@ -34,6 +34,7 @@ canvas_sources = [
|
||||||
'canvas.cc',
|
'canvas.cc',
|
||||||
'circle.cc',
|
'circle.cc',
|
||||||
'container.cc',
|
'container.cc',
|
||||||
|
'constraint_packer.cc',
|
||||||
'curve.cc',
|
'curve.cc',
|
||||||
'debug.cc',
|
'debug.cc',
|
||||||
'item.cc',
|
'item.cc',
|
||||||
|
@ -161,6 +162,15 @@ def build(bld):
|
||||||
manual_testobj.target = target
|
manual_testobj.target = target
|
||||||
manual_testobj.install_path = ''
|
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():
|
def shutdown():
|
||||||
autowaf.shutdown()
|
autowaf.shutdown()
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user