extend Triggerbox GUI with a window (for now)
This commit is contained in:
parent
aed9adceee
commit
f00e5f3c16
@ -16,6 +16,7 @@
|
||||
* 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
|
||||
*/
|
||||
|
||||
#include "pbd/i18n.h"
|
||||
#include "ardour/triggerbox.h"
|
||||
|
||||
#include "gtkmm2ext/utils.h"
|
||||
@ -74,14 +75,14 @@ TriggerBoxUI::build ()
|
||||
Trigger* t;
|
||||
size_t n = 0;
|
||||
|
||||
clear_items (true);
|
||||
// clear_items (true);
|
||||
|
||||
while (true) {
|
||||
t = _triggerbox.trigger (n);
|
||||
if (!t) {
|
||||
break;
|
||||
}
|
||||
|
||||
std::cerr << "NEW TE for trigger " << n << std::endl;
|
||||
(void) new TriggerEntry (this, *t);
|
||||
}
|
||||
}
|
||||
@ -92,3 +93,14 @@ TriggerBoxWidget::TriggerBoxWidget (TriggerBox& tb)
|
||||
{
|
||||
ui = new TriggerBoxUI (root(), tb);
|
||||
}
|
||||
|
||||
/* ------------ */
|
||||
|
||||
TriggerBoxWindow::TriggerBoxWindow (TriggerBox& tb)
|
||||
{
|
||||
TriggerBoxWidget* tbw = manage (new TriggerBoxWidget (tb));
|
||||
set_title (_("TriggerBox for XXXX"));
|
||||
set_default_size (100, 100);
|
||||
add (*tbw);
|
||||
tbw->show ();
|
||||
}
|
||||
|
@ -21,6 +21,8 @@
|
||||
|
||||
#include <map>
|
||||
|
||||
#include <gtkmm/window.h>
|
||||
|
||||
#include "canvas/box.h"
|
||||
#include "canvas/canvas.h"
|
||||
#include "canvas/rectangle.h"
|
||||
@ -65,4 +67,12 @@ class TriggerBoxWidget : public ArdourCanvas::GtkCanvas
|
||||
TriggerBoxUI* ui;
|
||||
};
|
||||
|
||||
/* XXX probably for testing only */
|
||||
|
||||
class TriggerBoxWindow : public Gtk::Window
|
||||
{
|
||||
public:
|
||||
TriggerBoxWindow (ARDOUR::TriggerBox&);
|
||||
};
|
||||
|
||||
#endif /* __ardour_gtk_triggerbox_ui_h__ */
|
||||
|
Loading…
Reference in New Issue
Block a user