Ember
Loading...
Searching...
No Matches
LoadingDialog Class Reference

Custom loading dialog with detailed progress information. More...

#include <LoadingDialog.h>

Inheritance diagram for LoadingDialog:

Public Member Functions

 LoadingDialog (wxWindow *parent, const wxString &title)
virtual ~LoadingDialog ()
bool UpdateProgress (int current, int max, const wxString &message=wxEmptyString)
 Update progress and optionally add a log message.
void AppendLog (const wxString &message, const wxString &prefix="")
 Add a log message without updating progress.
void ClearLog ()
 Clear all log messages.
void SetMaxProgress (int max)
 Set the maximum value for the progress bar.
bool WasCancelled () const
 Check if the user requested cancellation.
void MarkComplete ()
 Mark loading as complete and change button to "Close".

Private Member Functions

void CreateControls ()
void OnCancel (wxCommandEvent &event)
void OnClose (wxCloseEvent &event)
 wxDECLARE_EVENT_TABLE ()

Private Attributes

wxGauge * progress_bar_
wxTextCtrl * log_text_
wxButton * cancel_button_
wxStaticText * status_label_
bool was_cancelled_
bool is_complete_
int current_progress_
int max_progress_

Detailed Description

Custom loading dialog with detailed progress information.

Shows a progress bar and a scrollable terminal-like log of all parsing steps. Grays out the UI behind it (modal behavior).

Definition at line 13 of file LoadingDialog.h.

Constructor & Destructor Documentation

◆ LoadingDialog()

LoadingDialog::LoadingDialog ( wxWindow * parent,
const wxString & title )

◆ ~LoadingDialog()

LoadingDialog::~LoadingDialog ( )
virtual

Definition at line 16 of file LoadingDialog.cpp.

Member Function Documentation

◆ AppendLog()

void LoadingDialog::AppendLog ( const wxString & message,
const wxString & prefix = "" )

Add a log message without updating progress.

Parameters
messageMessage to append to the log
prefixOptional prefix (e.g., "[INFO]", "[WARN]")

Definition at line 113 of file LoadingDialog.cpp.

◆ ClearLog()

void LoadingDialog::ClearLog ( )

Clear all log messages.

Definition at line 149 of file LoadingDialog.cpp.

◆ CreateControls()

void LoadingDialog::CreateControls ( )
private

Definition at line 18 of file LoadingDialog.cpp.

◆ MarkComplete()

void LoadingDialog::MarkComplete ( )

Mark loading as complete and change button to "Close".

Definition at line 162 of file LoadingDialog.cpp.

◆ OnCancel()

void LoadingDialog::OnCancel ( wxCommandEvent & event)
private

Definition at line 176 of file LoadingDialog.cpp.

◆ OnClose()

void LoadingDialog::OnClose ( wxCloseEvent & event)
private

Definition at line 199 of file LoadingDialog.cpp.

◆ SetMaxProgress()

void LoadingDialog::SetMaxProgress ( int max)

Set the maximum value for the progress bar.

Definition at line 155 of file LoadingDialog.cpp.

◆ UpdateProgress()

bool LoadingDialog::UpdateProgress ( int current,
int max,
const wxString & message = wxEmptyString )

Update progress and optionally add a log message.

Parameters
currentCurrent progress value
maxMaximum progress value
messageMessage to display in the log (optional)
Returns
true to continue, false if user cancelled

Definition at line 72 of file LoadingDialog.cpp.

◆ WasCancelled()

bool LoadingDialog::WasCancelled ( ) const
inline

Check if the user requested cancellation.

Definition at line 47 of file LoadingDialog.h.

◆ wxDECLARE_EVENT_TABLE()

LoadingDialog::wxDECLARE_EVENT_TABLE ( )
private

Member Data Documentation

◆ cancel_button_

wxButton* LoadingDialog::cancel_button_
private

Definition at line 62 of file LoadingDialog.h.

◆ current_progress_

int LoadingDialog::current_progress_
private

Definition at line 67 of file LoadingDialog.h.

◆ is_complete_

bool LoadingDialog::is_complete_
private

Definition at line 66 of file LoadingDialog.h.

◆ log_text_

wxTextCtrl* LoadingDialog::log_text_
private

Definition at line 61 of file LoadingDialog.h.

◆ max_progress_

int LoadingDialog::max_progress_
private

Definition at line 68 of file LoadingDialog.h.

◆ progress_bar_

wxGauge* LoadingDialog::progress_bar_
private

Definition at line 60 of file LoadingDialog.h.

◆ status_label_

wxStaticText* LoadingDialog::status_label_
private

Definition at line 63 of file LoadingDialog.h.

◆ was_cancelled_

bool LoadingDialog::was_cancelled_
private

Definition at line 65 of file LoadingDialog.h.


The documentation for this class was generated from the following files: