Ardour
9.0-pre0-822-g12e3bc5c20
|
#include <luadialog.h>
Public Member Functions | |
ProgressWindow (std::string const &title, bool allow_cancel) | |
bool | progress (float prog, std::string const &text="") |
bool | canceled () const |
void | done () |
Public Member Functions inherited from ArdourDialog | |
ArdourDialog (const std::string &title, bool modal=false, bool use_separator=false) | |
ArdourDialog (Gtk::Window &parent, const std::string &title, bool modal=false, bool use_separator=false) | |
~ArdourDialog () | |
bool | on_focus_in_event (GdkEventFocus *) |
bool | on_focus_out_event (GdkEventFocus *) |
bool | on_delete_event (GdkEventAny *) |
void | on_unmap () |
void | on_show () |
virtual void | on_response (int) |
void | set_ui_sensitive (bool) |
void | disallow_idle () |
Public Member Functions inherited from ARDOUR::SessionHandlePtr | |
SessionHandlePtr (ARDOUR::Session *s) | |
SessionHandlePtr () | |
virtual | ~SessionHandlePtr () |
virtual void | set_session (ARDOUR::Session *) |
virtual ARDOUR::Session * | session () const |
Private Member Functions | |
void | cancel_clicked () |
Private Attributes | |
Gtk::ProgressBar | _bar |
bool | _canceled |
Additional Inherited Members | |
Protected Member Functions inherited from ArdourDialog | |
void | pop_splash () |
void | close_self () |
Protected Member Functions inherited from ARDOUR::SessionHandlePtr | |
virtual void | session_going_away () |
Protected Attributes inherited from ArdourDialog | |
bool | _sensitive |
Protected Attributes inherited from ARDOUR::SessionHandlePtr | |
ARDOUR::Session * | _session |
PBD::ScopedConnectionList | _session_connections |
Synchronous GUI-thread Progress dialog
This shows a modal progress dialog with an optional "Cancel" button. Since it runs in the UI thread the script needs to regularly call progress(), as well as close the dialog, as needed.
Definition at line 112 of file luadialog.h.
LuaDialog::ProgressWindow::ProgressWindow | ( | std::string const & | title, |
bool | allow_cancel | ||
) |
Create a new progress window.
title | Window title |
allow_cancel | include a "Cancel" option |
|
inlineprivate |
Definition at line 140 of file luadialog.h.
|
inline |
Definition at line 128 of file luadialog.h.
void LuaDialog::ProgressWindow::done | ( | ) |
Close and hide the dialog.
This is required to be at the end, since the dialog is modal and prevents other UI operations while visible.
bool LuaDialog::ProgressWindow::progress | ( | float | prog, |
std::string const & | text = "" |
||
) |
Report progress and update GUI.
prog | progress in range 0..1 show a bar, values outside this range show a pulsing dialog. |
text | optional text to show on the progress-bar |
|
private |
Definition at line 144 of file luadialog.h.
|
private |
Definition at line 145 of file luadialog.h.