Nemiver  0.3
Classes | Namespaces | Macros | Functions
nmv-ui-utils.h File Reference
#include "common/nmv-api-macros.h"
#include <gtkmm.h>
#include "common/nmv-env.h"
#include "common/nmv-ustring.h"
#include "common/nmv-safe-ptr-utils.h"

Go to the source code of this file.

Classes

class  nemiver::ui_utils::ActionEntry
 
struct  nemiver::ui_utils::WidgetRef
 
struct  nemiver::ui_utils::WidgetUnref
 

Namespaces

 nemiver
 
 nemiver::ui_utils
 

Macros

#define NEMIVER_CATCH
 
#define NEMIVER_CATCH_AND_RETURN(a_value)
 

Functions

NEMIVER_API void nemiver::ui_utils::add_action_entries_to_action_group (const ActionEntry a_tab[], int a_num_entries, Glib::RefPtr< Gtk::ActionGroup > &a_group)
 
NEMIVER_API int nemiver::ui_utils::display_info (Gtk::Window &a_parent_window, const common::UString &a_message)
 
NEMIVER_API int nemiver::ui_utils::display_warning (Gtk::Window &a_parent_window, const common::UString &a_message)
 
NEMIVER_API int nemiver::ui_utils::display_error (Gtk::Window &a_parent_window, const common::UString &a_message)
 
NEMIVER_API int nemiver::ui_utils::display_error_not_transient (const UString &a_message)
 
NEMIVER_API int nemiver::ui_utils::ask_yes_no_question (Gtk::Window &a_parent_window, const common::UString &a_message)
 
NEMIVER_API int nemiver::ui_utils::ask_yes_no_question (Gtk::Window &a_parent_window, const common::UString &a_message, bool a_propose_dont_ask_question, bool &a_dont_ask_this_again)
 
NEMIVER_API int nemiver::ui_utils::ask_yes_no_cancel_question (Gtk::Window &a_parent_window, const common::UString &a_message)
 
NEMIVER_API bool nemiver::ui_utils::ask_user_to_select_file (Gtk::Window &a_parent, const UString &a_file_name, const UString &a_default_dir, UString &a_selected_file_path)
 
NEMIVER_API bool nemiver::ui_utils::find_file_or_ask_user (Gtk::Window &a_parent_window, const UString &a_file_path, const list< UString > &a_where_to_look, list< UString > &a_session_dirs, map< UString, bool > &a_ignore_paths, bool a_ignore_if_not_found, UString &a_absolute_path)
 
bool nemiver::ui_utils::find_file_and_read_line (Gtk::Window &a_parent_window, const UString &a_file_path, const list< UString > &a_where_to_look, list< UString > &a_sess_dirs, map< UString, bool > &a_ignore_paths, int a_line_number, string &a_line)
 
template<class T >
T * nemiver::ui_utils::get_widget_from_gtkbuilder (const Glib::RefPtr< Gtk::Builder > &a_gtkbuilder, const UString &a_widget_name)
 

Macro Definition Documentation

◆ NEMIVER_CATCH

#define NEMIVER_CATCH
Value:
} catch (Glib::Exception &e) { \
LOG_ERROR (std::string ("caught exception: '") + e.what () + "'"); \
} catch (std::exception &e) { \
LOG_ERROR (std::string ("caught exception: '") + e.what () + "'"); \
} catch (...) { \
LOG_ERROR ("caught unknown exception"); \
nemiver::ui_utils::display_error_not_transient ("An unknown error occured"); \
}

◆ NEMIVER_CATCH_AND_RETURN

#define NEMIVER_CATCH_AND_RETURN (   a_value)
Value:
} catch (Glib::Exception &e) { \
LOG_ERROR (std::string ("caught exception: '") + e.what () + "'"); \
return a_value; \
} catch (std::exception &e) { \
LOG_ERROR (std::string ("caught exception: '") + e.what () + "'"); \
return a_value; \
} catch (...) { \
LOG_ERROR ("Caught unknown exception"); \
nemiver::ui_utils::display_error_not_transient ("An unknown error occured"); \
return a_value; \
}
nemiver::ui_utils::display_error_not_transient
NEMIVER_API int display_error_not_transient(const UString &a_message)