Change LuaWindow into an ArdourWindow

* remember window visibility, size and position
* Show as toggle in the window-menu (rather than show action)
* reduce specialization, use WM and ArdourWindow infrastructure
  (transient parent, window-type, etc)
This commit is contained in:
Robin Gareus 2021-09-20 04:26:24 +02:00
parent 23c5793173
commit 747b24f063
No known key found for this signature in database
GPG key ID: A090BCE02CF57F04
7 changed files with 24 additions and 69 deletions

View file

@ -153,7 +153,6 @@ ARDOUR_UI::set_session (Session *s)
secondary_clock->set_session (s);
big_clock->set_session (s);
video_timeline->set_session (s);
lua_script_window->set_session (s);
rc_option_editor->set_session (s);
roll_controllable->set_session (s);
@ -878,28 +877,6 @@ ARDOUR_UI::toggle_meterbridge ()
}
}
void
ARDOUR_UI::toggle_luawindow ()
{
assert (editor && luawindow);
bool show = false;
if (luawindow->not_visible ()) {
show = true;
}
// TODO check overlap
if (show) {
luawindow->show_window ();
luawindow->present ();
luawindow->raise ();
} else {
luawindow->hide_window (NULL);
}
}
void
ARDOUR_UI::new_midi_tracer_window ()
{
@ -974,6 +951,13 @@ ARDOUR_UI::create_virtual_keyboard_window ()
return vkbd;
}
LuaWindow*
ARDOUR_UI::create_luawindow ()
{
LuaWindow* luawindow = LuaWindow::instance ();
return luawindow;
}
void
ARDOUR_UI::handle_locations_change (Location *)
{