Skip to content
Snippets Groups Projects
Commit 26a3775d authored by Andreas Fuchs's avatar Andreas Fuchs
Browse files

spr38038: Allow setting point in motif text boxes

The windows version of clim has long had a method called
silica::set-selection (not exported or documented), that lets users
set selection / point position in text entry fields and text edit
boxes. Add this method for Motif as well.

Are there user visible changes in this commit?  no
Is bootstrapping needed?                        no
Are tests included for new features?  Possible answers:
   no tests for new features
Tests run:  tested manually by customer

Change-Id: I0679f4f653fb4d799f4ba63c105dcffbe8f56ee9
parent 60256a39
No related branches found
No related tags found
No related merge requests found
......@@ -1020,6 +1020,13 @@
(and (not (zerop x))
(values (excl:native-to-string x)))))))
(defmethod silica::set-selection ((tf motif-text-editor) startpos endpos)
(let ((m (sheet-direct-mirror tf)))
(when m
(let* ((display (port-display (port tf)))
(time (tk::xt-last-timestamp-processed display)))
(tk::xm_text_set_selection m startpos endpos time)))))
(defmethod compose-space ((te motif-text-editor) &key width height)
(declare (ignore width height))
(make-space-requirement :width (process-width-specification te`(,(gadget-columns te) :character))
......
......@@ -244,6 +244,15 @@
:call-direct t
:arg-checking nil)
(def-foreign-call (xm_text_set_selection "XmTextSetSelection")
((x :foreign-address)
(first :long)
(last :long)
(time :foreign-address))
:returning :void
:call-direct t
:arg-checking nil)
(def-foreign-call (xm_scale_set_value "XmScaleSetValue")
((x :foreign-address) (y :int fixnum))
:returning :void
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment