[gtksourceviewmm] Implement StyleSchemeChooser
- From: Murray Cumming <murrayc src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gtksourceviewmm] Implement StyleSchemeChooser
- Date: Wed, 3 Aug 2016 10:24:38 +0000 (UTC)
commit cacee07d869960e285e42c424d3f30e026b77229
Author: Christoph Brill <egore911 gmail com>
Date: Sun May 10 19:04:38 2015 +0200
Implement StyleSchemeChooser
.../extradefs/generate_extra_defs_gtksourceview.cc | 1 +
gtksourceview/src/filelist.am | 1 +
gtksourceview/src/gtksourceview_signals.defs | 11 ++++
gtksourceview/src/styleschemechooser.ccg | 18 ++++++
gtksourceview/src/styleschemechooser.hg | 63 ++++++++++++++++++++
5 files changed, 94 insertions(+), 0 deletions(-)
---
diff --git a/codegen/extradefs/generate_extra_defs_gtksourceview.cc
b/codegen/extradefs/generate_extra_defs_gtksourceview.cc
index 9659dd0..2e5e1fb 100644
--- a/codegen/extradefs/generate_extra_defs_gtksourceview.cc
+++ b/codegen/extradefs/generate_extra_defs_gtksourceview.cc
@@ -47,6 +47,7 @@ int main (int argc, char *argv[])
<< get_defs (GTK_SOURCE_TYPE_SEARCH_SETTINGS)
<< 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_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 13e4c5b..b7cf217 100644
--- a/gtksourceview/src/filelist.am
+++ b/gtksourceview/src/filelist.am
@@ -32,6 +32,7 @@ files_hg = \
style.hg \
stylescheme.hg \
styleschememanager.hg \
+ styleschemechooser.hg \
undomanager.hg \
view.hg
diff --git a/gtksourceview/src/gtksourceview_signals.defs b/gtksourceview/src/gtksourceview_signals.defs
index 6b46d9d..e5cfd10 100644
--- a/gtksourceview/src/gtksourceview_signals.defs
+++ b/gtksourceview/src/gtksourceview_signals.defs
@@ -1132,6 +1132,17 @@
(construct-only #f)
)
+;; From GtkSourceStyleSchemeChooser
+
+(define-property style-scheme
+ (of-object "GtkSourceStyleSchemeChooser")
+ (prop-type "GParamObject")
+ (docs "Current style scheme")
+ (readable #t)
+ (writable #t)
+ (construct-only #f)
+)
+
;; From GtkSourceStyleSchemeManager
(define-property search-path
diff --git a/gtksourceview/src/styleschemechooser.ccg b/gtksourceview/src/styleschemechooser.ccg
new file mode 100644
index 0000000..a8ddc6a
--- /dev/null
+++ b/gtksourceview/src/styleschemechooser.ccg
@@ -0,0 +1,18 @@
+/* styleschemechooser.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/styleschemechooser.hg b/gtksourceview/src/styleschemechooser.hg
new file mode 100644
index 0000000..d264b08
--- /dev/null
+++ b/gtksourceview/src/styleschemechooser.hg
@@ -0,0 +1,63 @@
+/* styleschemechooser.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/gtksourcestyleschemechooser.h>
+
+#include <gtksourceviewmm/stylescheme.h>
+
+_DEFS(gtksourceviewmm,gtksourceview)
+_PINCLUDE(glibmm/private/object_p.h)
+
+namespace Gsv
+{
+
+/** GtkSourceStyleSchemeChooser is an interface that is implemented by widgets for choosing style schemes.
+ *
+ * In GtkSourceView, the main widgets that implement this interface are GtkSourceStyleSchemeChooserWidget and
+ * GtkSourceStyleSchemeChooserButton.
+ *
+ * @newin{3,16}
+ */
+class StyleSchemeChooser : public Glib::Object
+{
+ _CLASS_GOBJECT(StyleSchemeChooser, GtkSourceStyleSchemeChooser, GTK_SOURCE_STYLE_SCHEME_CHOOSER,
Glib::Object, GObject)
+
+public:
+
+ /** Gets the currently-selected scheme.
+ *
+ * @return the currently-selected scheme.
+ *
+ * @newin{3,16}
+ */
+ _WRAP_METHOD(Glib::RefPtr<StyleScheme> get_style_scheme(),
gtk_source_style_scheme_chooser_get_style_scheme)
+
+ /** Sets the scheme.
+ *
+ * @param scheme a GtkSourceStyleScheme
+ *
+ * @newin{3,16}
+ */
+ _WRAP_METHOD(void set_style_scheme(const Glib::RefPtr<StyleScheme>& scheme),
gtk_source_style_scheme_chooser_set_style_scheme)
+
+ _WRAP_PROPERTY("style-scheme", Glib::RefPtr<StyleScheme>)
+
+};
+
+} /* namespace Gsv */
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]