Lisp HUG Maillist Archive

Displaying rich text in rich text panes

I posted this question a couple weeks ago but got no response.  It  
seems like a basic operation, so I thought I would try again with  
slight rewording.

I am trying to display rich text in a rich text pane.  Specifically,  
I want to display a link that users can click on and have it bring up  
a browser window.

I can achieve this if I load an HTML file in from disk, using  
(capi:rich-text-pane-operation pane :load-file  
"myfile.html" :format :rtf).  The problem is that the text I want to  
display is not static, and it seems silly that I should have to  
generate the HTML, write it out to disk and immediately load it in  
again.  Is there a way to programatically specify rich text for a  
pane without having to load it from disk? I have tried using the HTML  
code as the :TEXT slot for the pane, but this simply displays the  
HTML code in plain text.

Thanks in advance,
Chris 


Should I be using undocumented methods?

When I find a function in the class browser (e.g., capi::force-change-size) 
with no associated documentation (via Help..Search and ADD-ONS), is the 
implication that I should be looking for a documented way of performing the 
function? Or is this documented someplace that I haven't found yet?  There are 
many times when I am in this situation.

Mitch 


Re: Should I be using undocumented methods?

On Thu, 12 Oct 2006 12:11:32 -0400, "Mitch Berkson" <mitch@bermita.com> wrote:

> When I find a function in the class browser (e.g.,
> capi::force-change-size) with no associated documentation (via
> Help..Search and ADD-ONS), is the implication that I should be
> looking for a documented way of performing the function? Or is this
> documented someplace that I haven't found yet?  There are many times
> when I am in this situation.

The main hint is not that the functions aren't documented, but that
their names aren't exported (thus the double colons).  This is by
convention a clear sign that you're not supposed to use this
functionality.


Re: How to force resize of an interface?

On Thu, 12 Oct 2006 18:24:13 -0400, "Mitch Berkson" <mitch@bermita.com> wrote:

> I am adding elements to a row-layout and would like the interface in
> which it is contained to expand to accomodate the increased width of
> the row-layout. If I could get the new width, I could use
> set-top-level-interface-geometry, but I don't see how to find out
> the new row-layout width.
>
> Using capi::force-change-size works, but I would like to use a CAPI
> exported function instead.  Thanks for any help.

In the following code the interface expands and shrinks automatically:

   (let* ((button1 (make-instance 'capi:push-button :text "Groucho"))
          (button2 (make-instance 'capi:push-button :text "Chico"))
          (layout (make-instance 'capi:row-layout
                                 :description (list button1 button2)))
          (interface (make-instance 'capi:interface
                                    :layout layout)))
     (capi:display interface)
     (flet ((add-button (name)
              (push (make-instance 'capi:push-button :text name)
                    (capi:layout-description layout)))
            (remove-button ()
              (pop (capi:layout-description layout))))
       (sleep 1)
       (capi:execute-with-interface interface #'add-button "Zeppo")
       (sleep 1)
       (capi:execute-with-interface interface #'remove-button)
       (sleep 1)
       (capi:execute-with-interface interface #'add-button "Harpo")))

Maybe your interface has layout restrictions which prevent it from
resizing?


Updated at: 2020-12-10 08:47 UTC