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

Cursor control in Editable Text dialogs



I need some help with cursor controlling and text editing functions in an
editable text dialog.

For example, I have the following following lisp code:

(defobject xx-window *window*)
(defobfun (exist xx-window) (init-list)
   (usual-exist init-list
                :window-type :document
                :window-position #@(2,200)
                :window-size #@(500,50)
                :dialog-items
                 (list (make-dialog-item *editable-text-dialog-item*
                                         #@(2,2)
                                         #@(495,16)
                                         ""
                                         nil
                                         :allows-return nil
                                         :dialog-item-nick-name 'io-pad))))

The standard macintosh functions Select, Copy, Cut, Paste, Clear
are defined in editable-text-dialog-items.

My application requires explicit handling of such functions in the IO-PAD.
I couldn't find any useful reference in MACL 1.3 Reference.

The problems I am facing are:

        1. How can I use those functions in my program?
           For example, when the user double clicks on any symbol
           it's get high-lighted. Now, how can I get the address
           of the selected range so that I can use other functions
           like Copy of Cut.

        2. When the cursor is moved within the text-dialog how to
           get it's address?

        3. could someone tell me how these functions are defined
           internally?


Shawkat Bhuiyan
bhuiyan@skorpio.usask.ca