emacs-devel
[Top][All Lists]
Advanced

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

Re: [Emacs-diffs] xwidget updated (1d8b8a2 -> 5f46725)


From: Eli Zaretskii
Subject: Re: [Emacs-diffs] xwidget updated (1d8b8a2 -> 5f46725)
Date: Fri, 16 Jan 2015 22:59:15 +0200

> From: address@hidden
> Cc: address@hidden,  address@hidden
> Date: Fri, 16 Jan 2015 21:50:20 +0100
> 
> (defmacro xwidget-demo (name &rest body)
>   `(defun ,(intern (concat "xwidget-demo-" name)) ()
>      (interactive)
>      (switch-to-buffer ,(format "*xwidget-demo-%s*" name))
>      (text-mode);;otherwise no local keymap
>      (insert "Some random text for xwidgets to be inserted in for demo 
> purposes.\n")
>      ,@body))
> 
> (xwidget-demo "a-button-bidi"
>               (xwidget-insert (point-min) 'Button  "button" 60  50)
>               (set (make-local-variable 'bidi-paragraph-direction) 
> 'right-to-left)
>               (define-key (current-local-map) [xwidget-event] 
> 'xwidget-handler-demo-basic))
> 
> and I get a buffer with some text that behaves in R2L mode, and a gtk
> button embedded in the text.
> 
> The button doesnt seem to move with the text as it should, it stays
> glued to the right window edge for some reason.
> 
> I tried adding some missing bidi code in produce_xwidget_glyph() but the
> result is the same, so I'm obviously missing something. Any ideas?

I'm not sure I'm following, sorry.  Can you show a screenshot, and
explain what did you mean by "move with the text as it should"?

Also, what text did you insert?  If my reading of the defmacro and its
call is correct, you just put a single button alone on its line, in
which case it should behave like a single character, and should be
displayed at the right edge of the window when paragraph direction is
right-to-left.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]