Code

Implement cross-architecture print dialog using cairo and PNG backends.
[inkscape.git] / src / ui / widget / preferences-widget.h
index 5b64028837c79712160b3d6a2425fc3b16cac18b..72f010f13e8a48d893b8da07ae6e5c96f8f2de25 100644 (file)
@@ -21,7 +21,9 @@
 #include <gtkmm/tooltips.h>
 #include <gtkmm/treeview.h>
 #include <gtkmm/radiobutton.h>
+#include <gtkmm/box.h>
 #include <gtkmm/frame.h>
+#include <gtkmm/filechooserbutton.h>
 #include <sigc++/sigc++.h>
 //#include <glibmm/i18n.h>
 
@@ -32,7 +34,7 @@ namespace Widget {
 class PrefCheckButton : public Gtk::CheckButton
 {
 public:
-    void init(const Glib::ustring& label, const std::string& prefs_path, const std::string& attr, 
+    void init(const Glib::ustring& label, const std::string& prefs_path, const std::string& attr,
               bool default_value);
 protected:
     std::string _prefs_path;
@@ -44,9 +46,9 @@ protected:
 class PrefRadioButton : public Gtk::RadioButton
 {
 public:
-    void init(const Glib::ustring& label, const std::string& prefs_path, const std::string& attr, 
+    void init(const Glib::ustring& label, const std::string& prefs_path, const std::string& attr,
               int int_value, bool default_value, PrefRadioButton* group_member);
-    void init(const Glib::ustring& label, const std::string& prefs_path, const std::string& attr, 
+    void init(const Glib::ustring& label, const std::string& prefs_path, const std::string& attr,
               const std::string& string_value, bool default_value, PrefRadioButton* group_member);
     sigc::signal<void, bool> changed_signal;
 protected:
@@ -67,7 +69,7 @@ class PrefSpinButton : public Gtk::SpinButton
 {
 public:
     void init(const std::string& prefs_path, const std::string& attr,
-              double lower, double upper, double step_increment, double page_increment, 
+              double lower, double upper, double step_increment, double page_increment,
               double default_value, bool is_int, bool is_percent);
 protected:
     std::string _prefs_path;
@@ -97,7 +99,33 @@ public:
 protected:
     std::string _prefs_path;
     std::string _attr;
-    void on_activate();
+    void on_changed();
+};
+
+class PrefEntryButtonHBox : public Gtk::HBox
+{
+public:
+    void init(const std::string& prefs_path, const std::string& attr,
+            bool mask, gchar* default_string);
+protected:
+    std::string _prefs_path;
+    std::string _attr;
+    gchar* _default_string;
+    Gtk::Button *relatedButton;
+    Gtk::Entry *relatedEntry;
+    void onRelatedEntryChangedCallback();
+    void onRelatedButtonClickedCallback();
+};
+
+class PrefFileButton : public Gtk::FileChooserButton
+{
+public:
+    void init(const std::string& prefs_path, const std::string& attr);
+
+protected:
+    std::string _prefs_path;
+    std::string _attr;
+    void onFileChanged();
 };
 
 class DialogPage : public Gtk::Table
@@ -118,7 +146,7 @@ protected:
 
 #endif //INKSCAPE_UI_WIDGET_INKSCAPE_PREFERENCES_H
 
-/* 
+/*
   Local Variables:
   mode:c++
   c-file-style:"stroustrup"