add last backwards-compatible version
This commit is contained in:
@@ -2,28 +2,28 @@
|
||||
#include <functional>
|
||||
|
||||
//! Callback class passed to your threaded_process client code; allows you to give various visual feedback to the user.
|
||||
class threaded_process_status {
|
||||
class NOVTABLE threaded_process_status {
|
||||
public:
|
||||
enum {progress_min = 0, progress_max = 5000};
|
||||
|
||||
//! Sets the primary progress bar state; scale from progress_min to progress_max.
|
||||
virtual void set_progress(t_size p_state) {}
|
||||
virtual void set_progress(t_size p_state) = 0;
|
||||
//! Sets the secondary progress bar state; scale from progress_min to progress_max.
|
||||
virtual void set_progress_secondary(t_size p_state) {}
|
||||
virtual void set_progress_secondary(t_size p_state) = 0;
|
||||
//! Sets the currently progressed item label. When working with files, you should use set_file_path() instead.
|
||||
virtual void set_item(const char * p_item,t_size p_item_len = ~0) {}
|
||||
virtual void set_item(const char * p_item,t_size p_item_len = ~0) = 0;
|
||||
//! Sets the currently progressed item label; treats the label as a file path.
|
||||
virtual void set_item_path(const char * p_item,t_size p_item_len = ~0) {}
|
||||
virtual void set_item_path(const char * p_item,t_size p_item_len = ~0) = 0;
|
||||
//! Sets the title of the dialog. You normally don't need this function unless you want to override the title you set when initializing the threaded_process.
|
||||
virtual void set_title(const char * p_title,t_size p_title_len = ~0) {}
|
||||
virtual void set_title(const char * p_title,t_size p_title_len = ~0) = 0;
|
||||
//! Should not be used.
|
||||
virtual void force_update() {}
|
||||
virtual void force_update() = 0;
|
||||
//! Returns whether the process is paused.
|
||||
virtual bool is_paused() {return false;}
|
||||
virtual bool is_paused() = 0;
|
||||
|
||||
//! Checks if process is paused and sleeps if needed; returns false when process should be aborted, true on success. \n
|
||||
//! You should use poll_pause() instead of calling this directly.
|
||||
virtual bool process_pause() {return true;}
|
||||
virtual bool process_pause() = 0;
|
||||
|
||||
//! Automatically sleeps if the process is paused.
|
||||
void poll_pause() {if (!process_pause()) throw exception_aborted();}
|
||||
@@ -39,12 +39,9 @@ public:
|
||||
//! Helper; gracefully reports multiple items being concurrently worked on.
|
||||
void set_items( metadb_handle_list_cref items );
|
||||
void set_items( pfc::list_base_const_t<const char*> const & paths );
|
||||
};
|
||||
|
||||
//! Fb2k mobile compatibility
|
||||
class threaded_process_context {
|
||||
public:
|
||||
static HWND g_default() { return core_api::get_main_window(); }
|
||||
protected:
|
||||
threaded_process_status() {}
|
||||
~threaded_process_status() {}
|
||||
};
|
||||
|
||||
//! Callback class for the threaded_process API. You must implement this to create your own threaded_process client.
|
||||
|
||||
Reference in New Issue
Block a user