aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authornyamatongwe <devnull@localhost>2003-10-09 13:35:42 +0000
committernyamatongwe <devnull@localhost>2003-10-09 13:35:42 +0000
commita241eb23d2314c3f358c1bdae979d3f1d5a8a21b (patch)
tree33fc3ecdb8e28883c14d98b321f3fafa919b6044
parent5614c30d0c726cec25ff9990efd01c47ae7ec097 (diff)
downloadscintilla-mirror-a241eb23d2314c3f358c1bdae979d3f1d5a8a21b.tar.gz
Patch from Jim Cape for GTK+ 2.3 compatibility.
-rw-r--r--doc/ScintillaHistory.html1
-rw-r--r--gtk/ScintillaGTK.cxx25
2 files changed, 23 insertions, 3 deletions
diff --git a/doc/ScintillaHistory.html b/doc/ScintillaHistory.html
index 3505a09b3..118d90e28 100644
--- a/doc/ScintillaHistory.html
+++ b/doc/ScintillaHistory.html
@@ -145,6 +145,7 @@
<li>Sean O'Dell</li>
<li>Stefanos Togoulidis</li>
<li>Hans Hagen</li>
+ <li>Jim Cape</li>
</ul>
<p>
Images used in GTK+ version
diff --git a/gtk/ScintillaGTK.cxx b/gtk/ScintillaGTK.cxx
index d421d5326..21b938a69 100644
--- a/gtk/ScintillaGTK.cxx
+++ b/gtk/ScintillaGTK.cxx
@@ -123,7 +123,7 @@ class ScintillaGTK : public ScintillaBase {
public:
ScintillaGTK(_ScintillaObject *sci_);
virtual ~ScintillaGTK();
- static void ClassInit(GtkObjectClass* object_class, GtkWidgetClass *widget_class);
+ static void ClassInit(GtkObjectClass* object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class);
private:
virtual void Initialise();
@@ -183,6 +183,8 @@ private:
gint Expose(GtkWidget *widget, GdkEventExpose *ose);
static gint ExposeMain(GtkWidget *widget, GdkEventExpose *ose);
static void Draw(GtkWidget *widget, GdkRectangle *area);
+ void ForAll(GtkCallback callback, gpointer callback_data);
+ static void MainForAll(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data);
static void ScrollSignal(GtkAdjustment *adj, ScintillaGTK *sciThis);
static void ScrollHSignal(GtkAdjustment *adj, ScintillaGTK *sciThis);
@@ -456,6 +458,20 @@ void ScintillaGTK::UnMap(GtkWidget *widget) {
sciThis->UnMapThis();
}
+void ScintillaGTK::ForAll(GtkCallback callback, gpointer callback_data) {
+ (*callback) (PWidget(wText), callback_data);
+ (*callback) (PWidget(scrollbarv), callback_data);
+ (*callback) (PWidget(scrollbarh), callback_data);
+}
+
+void ScintillaGTK::MainForAll(GtkContainer *container, gboolean include_internals, GtkCallback callback, gpointer callback_data) {
+ ScintillaGTK *sciThis = ScintillaFromWidget((GtkWidget *)container);
+
+ if (callback != NULL && include_internals) {
+ sciThis->ForAll(callback, callback_data);
+ }
+}
+
#ifdef INTERNATIONAL_INPUT
gint ScintillaGTK::CursorMoved(GtkWidget *widget, int xoffset, int yoffset, ScintillaGTK *sciThis) {
if (GTK_WIDGET_HAS_FOCUS(widget) && gdk_im_ready() && sciThis->ic &&
@@ -2065,7 +2081,7 @@ guint scintilla_get_type() {
return scintilla_type;
}
-void ScintillaGTK::ClassInit(GtkObjectClass* object_class, GtkWidgetClass *widget_class) {
+void ScintillaGTK::ClassInit(GtkObjectClass* object_class, GtkWidgetClass *widget_class, GtkContainerClass *container_class) {
// Define default signal handlers for the class: Could move more
// of the signal handlers here (those that currently attached to wDraw
// in Initialise() may require coordinate translation?)
@@ -2107,6 +2123,8 @@ void ScintillaGTK::ClassInit(GtkObjectClass* object_class, GtkWidgetClass *widge
widget_class->unrealize = UnRealize;
widget_class->map = Map;
widget_class->unmap = UnMap;
+
+ container_class->forall = MainForAll;
}
#if GTK_MAJOR_VERSION < 2
@@ -2121,6 +2139,7 @@ void ScintillaGTK::ClassInit(GtkObjectClass* object_class, GtkWidgetClass *widge
static void scintilla_class_init(ScintillaClass *klass) {
GtkObjectClass *object_class = (GtkObjectClass*) klass;
GtkWidgetClass *widget_class = (GtkWidgetClass*) klass;
+ GtkContainerClass *container_class = (GtkContainerClass*) klass;
parent_class = (GtkWidgetClass*) gtk_type_class(gtk_container_get_type());
@@ -2148,7 +2167,7 @@ static void scintilla_class_init(ScintillaClass *klass) {
klass->command = NULL;
klass->notify = NULL;
- ScintillaGTK::ClassInit(object_class, widget_class);
+ ScintillaGTK::ClassInit(object_class, widget_class, container_class);
}
static void scintilla_init(ScintillaObject *sci) {