]> git.neil.brown.name Git - edlib.git/commitdiff
Remove old pane-text interface
authorNeilBrown <neil@brown.name>
Tue, 12 Jan 2016 02:34:39 +0000 (13:34 +1100)
committerNeilBrown <neil@brown.name>
Tue, 12 Jan 2016 02:34:39 +0000 (13:34 +1100)
No longer used.

Signed-off-by: NeilBrown <neil@brown.name>
core-pane.c
core.h
display-ncurses.c
python/display-pygtk.py

index 508bfd5e6674928d4616b6c3210fbe241d738a4c..10d1bf36b98aa13b73ea4b540969641927cd0a0c 100644 (file)
@@ -569,20 +569,6 @@ void pane_clear(struct pane *p, char *attrs)
        key_handle(&ci);
 }
 
-void pane_text(struct pane *p, wchar_t ch, char *attrs, int x, int y)
-{
-       struct cmd_info ci = {0};
-
-       ci.key = "pane-text";
-       ci.focus = p;
-       ci.x = x;
-       ci.y = y;
-       ci.str2 = attrs;
-       ci.extra = ch;
-
-       key_handle(&ci);
-}
-
 char *pane_attr_get(struct pane *p, char *key)
 {
        struct pane *c;
diff --git a/core.h b/core.h
index a388d07464f91e945424188b238d2a8981df0402..f256397fffed9f3aae87ee7bf291fed76a0e86e1 100644 (file)
--- a/core.h
+++ b/core.h
@@ -350,7 +350,6 @@ void pane_set_numeric(struct pane *p, int numeric);
 void pane_set_extra(struct pane *p, int extra);
 struct pane *pane_attach(struct pane *p, char *type, struct pane *dp, char *arg);
 void pane_clear(struct pane *p, char *attrs);
-void pane_text(struct pane *p, wchar_t ch, char *attrs, int x, int y);
 char *pane_attr_get(struct pane *p, char *key);
 char *pane_mark_attr(struct pane *p, struct mark *m, int forward, char *key);
 void pane_absxy(struct pane *p, int *x, int *y);
index db5414018063d4bab863c5c99b1fad7478bbf235..b1acb31b212183db55c2be71b3c7c8478a796e26 100644 (file)
@@ -139,11 +139,6 @@ DEF_CMD(ncurses_handle)
                ncurses_clear(ci->focus, attr, 0, 0, 0, 0);
                return 1;
        }
-       if (strcmp(ci->key, "pane-text") == 0) {
-               int attr = cvt_attrs(ci->str2);
-               ncurses_text(ci->focus, ci->extra, attr, ci->x, ci->y, 0);
-               return 1;
-       }
        if (strcmp(ci->key, "text-size") == 0) {
                int max_space = ci->numeric;
                int max_bytes = 0;
index 7e6a3db95482df33cda453f23793a7b69b0ff4fb..59252b8a559bc32d6ebe82cf995cb78fa5fcfa34 100644 (file)
@@ -28,17 +28,6 @@ class EdDisplay(gtk.Window):
         self.show()
 
     def handle(self, key, **a):
-        if key == "pane-text":
-            (x,y) = a["xy"]
-            c = a["extra"]
-            f = a["focus"]
-            if "str2" in a:
-                attr = a["str2"]
-            else:
-                attr = ""
-            pm = self.get_pixmap(f);
-            self.draw_char(pm, x, y, c, attr)
-            return True
         if key == "pane-clear":
             f = a["focus"]
             if "str2" in a:
@@ -266,25 +255,6 @@ class EdDisplay(gtk.Window):
         self.pane.call_focus("Keystroke", self.pane, s)
         self.pane.refresh()
 
-    def draw_char(self, pm, x, y, c, attr):
-        t = self.text
-        if not self.gc:
-            self.gc = t.window.new_gc()
-            cmap = t.get_colormap()
-            self.gc.set_foreground(cmap.alloc_color(gtk.gdk.color_parse("blue")))
-        if not self.bg:
-            self.bg = t.window.new_gc()
-            cmap = t.get_colormap()
-            self.bg.set_foreground(cmap.alloc_color(gtk.gdk.color_parse("lightyellow")))
-        layout = t.create_pango_layout(unichr(c))
-        bg = self.bg; fg = self.gc
-        if "inverse" in attr:
-            fg,bg = bg,fg
-        pm.draw_rectangle(bg, True, x, y, self.charwidth, self.lineheight)
-        pm.draw_layout(fg, x, y, layout)
-        t.queue_draw()
-        return False
-
     def do_clear(self, pm, colour):
 
         t = self.text