No longer used.
Signed-off-by: NeilBrown <neil@brown.name>
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;
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);
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;
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:
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