@@ -155,6 +155,31 @@ get_cursor_position() const {
155155 return _cursor_position;
156156}
157157
158+ // //////////////////////////////////////////////////////////////////
159+ // Function: PGEntry::get_cursor_X
160+ // Access: Published
161+ // Description: Returns the node position x of the cursor
162+ // //////////////////////////////////////////////////////////////////
163+
164+ INLINE float PGEntry::
165+ get_cursor_X () const {
166+ LightReMutexHolder holder (_lock);
167+ return _cursor_def.get_x ();
168+ }
169+
170+ // //////////////////////////////////////////////////////////////////
171+ // Function: PGEntry::get_cursor_y
172+ // Access: Published
173+ // Description: Returns the node position y of the cursor
174+ // //////////////////////////////////////////////////////////////////
175+
176+ INLINE float PGEntry::
177+ get_cursor_Y () const {
178+ LightReMutexHolder holder (_lock);
179+ return _cursor_def.get_y ();
180+ }
181+
182+
158183// //////////////////////////////////////////////////////////////////
159184// Function: PGEntry::set_max_chars
160185// Access: Published
@@ -488,6 +513,18 @@ get_erase_prefix() {
488513 return " erase-" ;
489514}
490515
516+ // //////////////////////////////////////////////////////////////////
517+ // Function: PGEntry::get_cursormove_prefix
518+ // Access: Published, Static
519+ // Description: Returns the prefix that is used to define the cursor
520+ // event for all PGEntries. The cursor event is the
521+ // concatenation of this string followed by get_id().
522+ // //////////////////////////////////////////////////////////////////
523+ INLINE string PGEntry::
524+ get_cursormove_prefix () {
525+ return " cursormove-" ;
526+ }
527+
491528// //////////////////////////////////////////////////////////////////
492529// Function: PGEntry::get_accept_event
493530// Access: Published
@@ -545,6 +582,17 @@ get_erase_event() const {
545582 return get_erase_prefix () + get_id ();
546583}
547584
585+ // //////////////////////////////////////////////////////////////////
586+ // Function: PGEntry::get_cursormove_event
587+ // Access: Published
588+ // Description: Returns the event name that will be thrown whenever
589+ // the cursor moves
590+ // //////////////////////////////////////////////////////////////////
591+ INLINE string PGEntry::
592+ get_cursormove_event () const {
593+ return get_cursormove_prefix () + get_id ();
594+ }
595+
548596// //////////////////////////////////////////////////////////////////
549597// Function: PGEntry::set_wtext
550598// Access: Published
0 commit comments