[gtksourceviewmm] Implement StyleSchemeChooserWidget and StyleSchemeChooserButton



commit 3812cfc695257af3011b56350e02c15a885b2846
Author: Christoph Brill <egore911 gmail com>
Date:   Sun May 10 19:27:17 2015 +0200

    Implement StyleSchemeChooserWidget and StyleSchemeChooserButton

 .../extradefs/generate_extra_defs_gtksourceview.cc |    2 +
 gtksourceview/src/filelist.am                      |    2 +
 gtksourceview/src/gtksourceview_signals.defs       |    4 ++
 gtksourceview/src/styleschemechooserbutton.ccg     |   18 +++++++
 gtksourceview/src/styleschemechooserbutton.hg      |   49 ++++++++++++++++++++
 gtksourceview/src/styleschemechooserwidget.ccg     |   18 +++++++
 gtksourceview/src/styleschemechooserwidget.hg      |   48 +++++++++++++++++++
 7 files changed, 141 insertions(+), 0 deletions(-)
---
diff --git a/codegen/extradefs/generate_extra_defs_gtksourceview.cc 
b/codegen/extradefs/generate_extra_defs_gtksourceview.cc
index 2e5e1fb..db4b5ab 100644
--- a/codegen/extradefs/generate_extra_defs_gtksourceview.cc
+++ b/codegen/extradefs/generate_extra_defs_gtksourceview.cc
@@ -48,6 +48,8 @@ int main (int argc, char *argv[])
             << get_defs (GTK_SOURCE_TYPE_STYLE)
             << get_defs (GTK_SOURCE_TYPE_STYLE_SCHEME)
             << get_defs (GTK_SOURCE_TYPE_STYLE_SCHEME_CHOOSER)
+            << get_defs (GTK_SOURCE_TYPE_STYLE_SCHEME_CHOOSER_BUTTON)
+            << get_defs (GTK_SOURCE_TYPE_STYLE_SCHEME_CHOOSER_WIDGET)
             << get_defs (GTK_SOURCE_TYPE_STYLE_SCHEME_MANAGER)
             << get_defs (GTK_SOURCE_TYPE_UNDO_MANAGER)
             << get_defs (GTK_SOURCE_TYPE_VIEW)
diff --git a/gtksourceview/src/filelist.am b/gtksourceview/src/filelist.am
index b7cf217..0137318 100644
--- a/gtksourceview/src/filelist.am
+++ b/gtksourceview/src/filelist.am
@@ -33,6 +33,8 @@ files_hg =                            \
        stylescheme.hg                  \
        styleschememanager.hg           \
        styleschemechooser.hg           \
+       styleschemechooserbutton.hg     \
+       styleschemechooserwidget.hg     \
        undomanager.hg                  \
        view.hg
 
diff --git a/gtksourceview/src/gtksourceview_signals.defs b/gtksourceview/src/gtksourceview_signals.defs
index e5cfd10..b785829 100644
--- a/gtksourceview/src/gtksourceview_signals.defs
+++ b/gtksourceview/src/gtksourceview_signals.defs
@@ -1143,6 +1143,10 @@
   (construct-only #f)
 )
 
+;; From GtkSourceStyleSchemeChooserButton
+
+;; From GtkSourceStyleSchemeChooserWidget
+
 ;; From GtkSourceStyleSchemeManager
 
 (define-property search-path
diff --git a/gtksourceview/src/styleschemechooserbutton.ccg b/gtksourceview/src/styleschemechooserbutton.ccg
new file mode 100644
index 0000000..336fa33
--- /dev/null
+++ b/gtksourceview/src/styleschemechooserbutton.ccg
@@ -0,0 +1,18 @@
+/* styleschemechooserbutton.cc
+ *
+ * Copyright (C) 2015 Christoph Brill
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
\ No newline at end of file
diff --git a/gtksourceview/src/styleschemechooserbutton.hg b/gtksourceview/src/styleschemechooserbutton.hg
new file mode 100644
index 0000000..8b402fe
--- /dev/null
+++ b/gtksourceview/src/styleschemechooserbutton.hg
@@ -0,0 +1,49 @@
+/* styleschemechooserbutton.h
+ *
+ * Copyright (C) 2015 Christoph Brill
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtksourceview/gtksourcestyleschemechooserbutton.h>
+
+#include <gtkmm/button.h>
+
+_DEFS(gtksourceviewmm,gtksourceview)
+_PINCLUDE(gtkmm/private/button_p.h)
+
+namespace Gsv
+{
+
+/** The GtkSourceStyleSchemeChooserButton is a button which displays the currently selected style scheme and 
allows
+ * to open a style scheme selection dialog to change the style scheme. It is suitable widget for selecting a 
style
+ * scheme in a preference dialog.
+ *
+ * In GtkSourceStyleSchemeChooserButton, a GtkSourceStyleSchemeChooserWidget is used to provide a dialog for 
selecting
+ * style schemes.
+ *
+ * @newin {3,16}
+ */
+class StyleSchemeChooserButton : public Gtk::Button
+{
+  _CLASS_GTKOBJECT(StyleSchemeChooserButton, GtkSourceStyleStyleSchemeChooserButton, 
GTK_SOURCE_STYLE_SCHEME_CHOOSER_BUTTON, Gtk::Button, GtkButton)
+
+public:
+
+  _CTOR_DEFAULT()
+
+};
+
+} /* namespace Gsv */
diff --git a/gtksourceview/src/styleschemechooserwidget.ccg b/gtksourceview/src/styleschemechooserwidget.ccg
new file mode 100644
index 0000000..630c2f7
--- /dev/null
+++ b/gtksourceview/src/styleschemechooserwidget.ccg
@@ -0,0 +1,18 @@
+/* styleschemechooserwidget.cc
+ *
+ * Copyright (C) 2015 Christoph Brill
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
\ No newline at end of file
diff --git a/gtksourceview/src/styleschemechooserwidget.hg b/gtksourceview/src/styleschemechooserwidget.hg
new file mode 100644
index 0000000..723aaea
--- /dev/null
+++ b/gtksourceview/src/styleschemechooserwidget.hg
@@ -0,0 +1,48 @@
+/* styleschemechooserwidget.h
+ *
+ * Copyright (C) 2015 Christoph Brill
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Library General Public
+ * License as published by the Free Software Foundation; either
+ * version 2 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Library General Public License for more details.
+ *
+ * You should have received a copy of the GNU Library General Public
+ * License along with this library; if not, write to the Free
+ * Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+#include <gtksourceview/gtksourcestyleschemechooserwidget.h>
+
+#include <gtkmm/bin.h>
+
+_DEFS(gtksourceviewmm,gtksourceview)
+_PINCLUDE(gtkmm/private/bin_p.h)
+
+namespace Gsv
+{
+
+/** The GtkSourceStyleSchemeChooserWidget widget lets the user select a style scheme. By default, the chooser
+ * presents a predefined list of style schemes.
+ *
+ * To change the initially selected style scheme, use gtk_source_style_scheme_chooser_set_style_scheme(). To 
get
+ * the selected style scheme use gtk_source_style_scheme_chooser_get_style_scheme().
+ *
+ * @newin{3,16}
+ */
+class StyleSchemeChooserWidget : public Gtk::Bin
+{
+  _CLASS_GTKOBJECT(StyleSchemeChooserWidget, GtkSourceStyleStyleSchemeChooserWidget, 
GTK_SOURCE_STYLE_SCHEME_CHOOSER_WIDGET, Gtk::Bin, GtkBin)
+
+public:
+
+  _CTOR_DEFAULT()
+
+};
+
+} /* namespace Gsv */


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]