2 public static class Runnable {
6 @SuppressWarnings
public class QObject : QCore {
8 public static bool _ui_loop_busy =
false;
11 synchronized(_uiloop_list) {
12 _uiloop_list.
add(task);
14 Notify(Constant.NEW_UI_TASK_NID);
35 if (eventid == Constant.NEW_UI_TASK_NID) {
36 if (_ui_loop_busy ==
false){
38 while (_uiloop_list.
size() > 0) {
40 synchronized(_uiloop_list) {
41 if (_uiloop_list.
size() > 0) {
53 _ui_loop_busy =
false;
56 onNotification(eventid);
58 if (_notifyListener != nilptr) {
59 _notifyListener.onNotify(
this, eventid);
65 if (_notifyListener != nilptr) {
66 _notifyListener.onNotify(
this, eventid);
73 public TableWidgetEventListener _tableenvlis = nilptr;
74 public onFileSystemChangeListener _fsweListener = nilptr;
75 public onEditEventListener _editEventListener = nilptr;
76 public onMouseEventListener _mouseListener = nilptr;
77 public onKeyEventListener _keyListener = nilptr;
78 public onFocusEventListener _focusListener = nilptr;
79 public onScopeEventListener _scopeListener = nilptr;
80 public onPaintListener _paintEvent = nilptr;
81 public onLayoutEventListener _layoutEvent = nilptr;
82 public onStatusListener _statusEvent = nilptr;
83 public onUpdateListener _updateListener = nilptr;
84 public onEventListener _eventListener = nilptr;
85 public onTreeViewItemEvent _treeitemevent = nilptr;
86 public onNotifyListener _notifyListener = nilptr;
87 public onClickListener _clicklistener = nilptr;
88 public SciEventListener _sciEventListener = nilptr;
89 public onContextMenuListener _contextMenuListener = nilptr;
90 public onActivateListener _activateListener = nilptr;
91 public onComboBoxEventListener _comboboxListener = nilptr;
92 public onDragListener _dragListener = nilptr;
100 _comboboxListener = l;
103 _activateListener = l;
106 _contextMenuListener = l;
109 _sciEventListener = l;
129 _editEventListener = l;
165 return (QObject)QtXnl.findControl(nativehandle, name);
169 newObj.nativehandle = QtXnl.attachControl(nativehandle, newObj, name);
170 if (newObj.nativehandle != 0) {
177 public bool attach(@NotNilptr QObject obj) {
178 nativehandle = QtXnl.core_attach(obj.nativehandle,
this);
179 if (nativehandle != 0) {
187 return (
String)QtXnl.core_getName(nativehandle);
191 QtXnl.widget_slot(nativehandle, Constant.DELETE_OBJECT);
195 QtXnl.widget_slot_string(nativehandle, Constant.OBJECTSETNAME, name);
199 return (
String)QtXnl.core_getClassName(nativehandle);
203 return (QObject)QtXnl.core_getParent(nativehandle);
209 if (_mouseListener != nilptr) {
210 _mouseListener.onMouseButtonPress(
this, Button, x, y, flags, source);
215 if (_mouseListener != nilptr) {
216 _mouseListener.onMouseButtonRelease(
this, Button, x, y, flags, source);
221 if (_mouseListener != nilptr) {
222 _mouseListener.onMouseButtonDblClick(
this, Button, x, y, flags, source);
226 public void onMouseMove(
int Button,
int x,
int y,
int flags,
int source) {
227 if (_mouseListener != nilptr) {
228 _mouseListener.onMouseMove(
this, Button, x, y, flags, source);
231 public void onWheel(
int button,
int x,
int y,
int Orientation,
int delta,
bool inverted) {
232 if (_mouseListener != nilptr) {
233 _mouseListener.onWheel(
this, button, x, y, Orientation, delta, inverted);
237 public bool onKeyPress(
int key,
bool repeat,
int count,
String text,
int scanCode,
int virtualKey,
int modifier) {
238 if (_keyListener != nilptr) {
239 return _keyListener.onKeyPress(
this, key, repeat, count, text, scanCode, virtualKey, modifier);
243 public bool onKeyRelease(
int key,
bool repeat,
int count,
String text,
int scanCode,
int virtualKey,
int modifier) {
244 if (_keyListener != nilptr) {
245 return _keyListener.onKeyRelease(
this, key, repeat, count, text, scanCode, virtualKey, modifier);
250 if (_focusListener != nilptr) {
251 _focusListener.onFocusIn(
this, focus, reson);
255 if (_focusListener != nilptr) {
256 _focusListener.onFocusOut(
this, focus, reson);
260 if (_focusListener != nilptr) {
261 _focusListener.onFocusAboutToChange(
this, focus, reson);
265 if (_scopeListener != nilptr) {
266 _scopeListener.onEnter(
this, x, y);
270 if (_scopeListener != nilptr) {
271 _scopeListener.onLeave(
this);
274 public void onPaint(
int l,
int t,
int r,
int b,
long hpaint) {
275 if (_paintEvent != nilptr) {
276 _paintEvent.onPaint(
this, l, t, r, b, hpaint);
279 public void onMove(
int x,
int y,
int oldx,
int oldy) {
280 if (_layoutEvent != nilptr) {
281 _layoutEvent.onMove(
this, x, y, oldx, oldy);
284 public void onResize(
int w,
int h,
int oldw,
int oldh) {
285 if (_layoutEvent != nilptr) {
286 _layoutEvent.onResize(
this, w, h, oldw, oldh);
290 if (_statusEvent != nilptr) {
291 _statusEvent.onCreate(
this);
295 if (_statusEvent != nilptr) {
296 _statusEvent.onDestroy(
this);
300 if (_statusEvent != nilptr) {
301 _statusEvent.onShow(
this);
305 if (_statusEvent != nilptr) {
306 _statusEvent.onHide(
this);
310 if (_statusEvent != nilptr) {
311 return _statusEvent.onClose(
this);
316 if (_statusEvent != nilptr) {
317 _statusEvent.onQuit(
this);
321 if (_statusEvent != nilptr) {
322 _statusEvent.onParentChange(
this);
327 if (_eventListener != nilptr) {
328 _eventListener.onTrigger(
this);
335 if (_activateListener != nilptr) {
336 _activateListener.onWindowActivate(
this);
340 if (_activateListener != nilptr) {
341 _activateListener.onWindowDeactivate(
this);
350 if (_dragListener != nilptr) {
351 return _dragListener.onDragEnter(
this, l,t,r,b);
356 if (_dragListener != nilptr) {
357 return _dragListener.onDragMove(
this, l,t,r,b);
362 if (_dragListener != nilptr) {
363 return _dragListener.onDragLeave(
this, l,t,r,b);
368 if (_dragListener != nilptr) {
369 _dragListener.onDrop(
this,
object);
375 if (_updateListener != nilptr) {
376 _updateListener.onUpdate(
this);
384 if (_contextMenuListener != nilptr) {
385 _contextMenuListener.onContextMenu(
this, x, y, reson);
410 if (_statusEvent != nilptr) {
411 _statusEvent.onWindowStateChange(
this, oldstate, state);
423 public void onShortcut(
int key,
int shortcutId,
bool ambig) {}
504 QtXnl.widget_set_object_value(nativehandle, Constant.SETTAG, obj);
507 return QtXnl.widget_get_object(nativehandle, Constant.GETTAG);
511 if (_treeitemevent != nilptr) {
512 _treeitemevent.onItemPressed((QTreeWidget)
this, item, column);
516 if (_treeitemevent != nilptr) {
517 _treeitemevent.onItemClicked((QTreeWidget)
this, item, column);
521 if (_treeitemevent != nilptr) {
522 _treeitemevent.onItemDoubleClicked((QTreeWidget)
this, item, column);
526 if (_treeitemevent != nilptr) {
527 _treeitemevent.onItemActived((QTreeWidget)
this, item, column);
531 if (_treeitemevent != nilptr) {
532 _treeitemevent.onItemEntered((QTreeWidget)
this, item, column);
536 if (_treeitemevent != nilptr) {
537 _treeitemevent.onItemChanged((QTreeWidget)
this, item, column);
541 if (_treeitemevent != nilptr) {
542 _treeitemevent.onItemExpanded((QTreeWidget)
this, item);
546 if (_treeitemevent != nilptr) {
547 _treeitemevent.onItemCollapsed((QTreeWidget)
this, item);
551 if (_treeitemevent != nilptr) {
552 _treeitemevent.onCurrentItemChanged((QTreeWidget)
this, cur, previous);
556 if (_treeitemevent != nilptr) {
557 _treeitemevent.onItemSelectionChanged((QTreeWidget)
this);
562 if (_clicklistener != nilptr) {
563 _clicklistener.onClick(
this, checked);
567 if (_clicklistener != nilptr) {
568 _clicklistener.onToggle(
this, checked);
572 if (_clicklistener != nilptr) {
573 _clicklistener.onPress(
this);
577 if (_clicklistener != nilptr) {
578 _clicklistener.onRelease(
this);
586 if (nativehandle != 0) {
587 QtXnl.widget_slot(nativehandle, Constant.NATIVEFINALIZE);
597 if (_sciEventListener != nilptr) {
598 _sciEventListener.QON_SELCHANGED((QScintilla)
this, yes);
602 if (_sciEventListener != nilptr) {
603 _sciEventListener.ON_AUTOCCANCELLED((QScintilla)
this);
607 if (_sciEventListener != nilptr) {
608 _sciEventListener.ON_AUTOCCHARDELETED((QScintilla)
this);
612 if (_sciEventListener != nilptr) {
613 _sciEventListener.ON_AUTOCCOMPLETED((QScintilla)
this, selection, position, ch, method);
617 if (_sciEventListener != nilptr) {
618 _sciEventListener.ON_AUTOCSELECTION((QScintilla)
this, selection, position, ch, method);
622 if (_sciEventListener != nilptr) {
623 _sciEventListener.ON_AUTOCSELECTION((QScintilla)
this, selection, position);
627 if (_sciEventListener != nilptr) {
628 _sciEventListener.SCEN_CHANGE((QScintilla)
this);
632 if (_sciEventListener != nilptr) {
633 _sciEventListener.ON_CALLTIPCLICK((QScintilla)
this, direction);
637 if (_sciEventListener != nilptr) {
638 _sciEventListener.ON_CHARADDED((QScintilla)
this, charadded);
642 if (_sciEventListener != nilptr) {
643 _sciEventListener.ON_DOUBLECLICK((QScintilla)
this, position, line, modifiers);
647 if (_sciEventListener != nilptr) {
648 _sciEventListener.ON_DWELLEND((QScintilla)
this, position, x, y);
652 if (_sciEventListener != nilptr) {
653 _sciEventListener.ON_DWELLSTART((QScintilla)
this, position, x, y);
657 if (_sciEventListener != nilptr) {
658 _sciEventListener.ON_FOCUSIN((QScintilla)
this);
662 if (_sciEventListener != nilptr) {
663 _sciEventListener.ON_FOCUSOUT((QScintilla)
this);
667 if (_sciEventListener != nilptr) {
668 _sciEventListener.ON_HOTSPOTCLICK((QScintilla)
this, position, modifiers);
672 if (_sciEventListener != nilptr) {
673 _sciEventListener.ON_HOTSPOTDOUBLECLICK((QScintilla)
this, position, modifiers);
677 if (_sciEventListener != nilptr) {
678 _sciEventListener.ON_HOTSPOTRELEASECLICK((QScintilla)
this, position, modifiers);
682 if (_sciEventListener != nilptr) {
683 _sciEventListener.ON_INDICATORCLICK((QScintilla)
this, position, modifiers);
687 if (_sciEventListener != nilptr) {
688 _sciEventListener.ON_INDICATORRELEASE((QScintilla)
this, position, modifiers);
692 if (_sciEventListener != nilptr) {
693 _sciEventListener.ON_MACRORECORD((QScintilla)
this, msg, wparam, lparam);
697 if (_sciEventListener != nilptr) {
698 _sciEventListener.ON_MARGINCLICK((QScintilla)
this, position, modifiers, margin);
702 if (_sciEventListener != nilptr) {
703 _sciEventListener.ON_MARGINRIGHTCLICK((QScintilla)
this, position, modifiers, margin);
706 public void ON_MODIFIED(
int position,
int modType,
String text,
int length,
int linesAdded,
int line,
int foldLevelNow,
int foldLevelPrev,
int token,
int annotationLinesAdded) {
707 if (_sciEventListener != nilptr) {
708 _sciEventListener.ON_MODIFIED((QScintilla)
this, position, modType, text, length, linesAdded, line, foldLevelNow, foldLevelPrev, token, annotationLinesAdded);
712 if (_sciEventListener != nilptr) {
713 _sciEventListener.ON_MODIFYATTEMPTRO((QScintilla)
this);
717 if (_sciEventListener != nilptr) {
718 _sciEventListener.ON_NEEDSHOWN((QScintilla)
this, position, length);
722 if (_sciEventListener != nilptr) {
723 _sciEventListener.ON_PAINTED((QScintilla)
this);
727 if (_sciEventListener != nilptr) {
728 _sciEventListener.ON_SAVEPOINTLEFT((QScintilla)
this);
732 if (_sciEventListener != nilptr) {
733 _sciEventListener.ON_SAVEPOINTREACHED((QScintilla)
this);
737 if (_sciEventListener != nilptr) {
738 _sciEventListener.ON_STYLENEEDED((QScintilla)
this, position);
742 if (_sciEventListener != nilptr) {
743 _sciEventListener.ON_UPDATEUI((QScintilla)
this, updated);
747 if (_sciEventListener != nilptr) {
748 _sciEventListener.ON_USERLISTSELECTION((QScintilla)
this, text, wparam, ch, listCompletionMethod);
752 if (_sciEventListener != nilptr) {
753 _sciEventListener.ON_USERLISTSELECTION((QScintilla)
this, text, wparam);
757 if (_sciEventListener != nilptr) {
758 _sciEventListener.ON_ZOOM((QScintilla)
this);
763 if (_editEventListener != nilptr) {
764 _editEventListener.onTextChanged(
this, text);
769 if (_editEventListener != nilptr) {
770 _editEventListener.onTextEdited(
this, text);
775 if (_editEventListener != nilptr) {
776 _editEventListener.onCursorPositionChanged(
this, n, o);
781 if (_editEventListener != nilptr) {
782 _editEventListener.onReturnPressed(
this);
787 if (_editEventListener != nilptr) {
788 _editEventListener.onEditingFinished(
this);
793 if (_editEventListener != nilptr) {
794 _editEventListener.onSelectionChanged(
this);
799 if (_comboboxListener != nilptr) {
800 _comboboxListener.onCurrentTextChange(
this, text);
805 if (_comboboxListener != nilptr) {
806 _comboboxListener.onActivated(
this,
id);
811 if (_comboboxListener != nilptr) {
812 _comboboxListener.onItemSelected(
this,
id);
818 if (_fsweListener != nilptr) {
819 _fsweListener.onFileChanged(
this, path);
824 if (_fsweListener != nilptr) {
825 _fsweListener.onDirChange(
this, path);
829 if (_tableenvlis != nilptr) {
830 _tableenvlis.onCellChange((QTableWidget)
this, row, column);
834 if (_tableenvlis != nilptr) {
835 _tableenvlis.onItemChange((QTableWidget)
this, item);
839 if (_tableenvlis != nilptr) {
840 _tableenvlis.onCellPress((QTableWidget)
this, row, column);
844 if (_tableenvlis != nilptr) {
845 _tableenvlis.onItemPress((QTableWidget)
this, item);
849 if (_tableenvlis != nilptr) {
850 _tableenvlis.onCellClick((QTableWidget)
this, row, column);
854 if (_tableenvlis != nilptr) {
855 _tableenvlis.onItemClick((QTableWidget)
this, item);
859 if (_tableenvlis != nilptr) {
860 _tableenvlis.onCellDBClick((QTableWidget)
this, row, column);
864 if (_tableenvlis != nilptr) {
865 _tableenvlis.onItemDBClick((QTableWidget)
this, item);
869 if (_tableenvlis != nilptr) {
870 _tableenvlis.onCellEnter((QTableWidget)
this, row, column);
874 if (_tableenvlis != nilptr) {
875 _tableenvlis.onItemEnter((QTableWidget)
this, item);
879 if (_tableenvlis != nilptr) {
880 _tableenvlis.onCellActived((QTableWidget)
this, row, column);
884 if (_tableenvlis != nilptr) {
885 _tableenvlis.onItemActived((QTableWidget)
this, item);
903 String [] params = {strName, strExt, strAppName, args, strAppKey, strDefaultIcon, strDescribe};
904 return QtXnl.array_int2(0, Constant.ASSOCIATEEXT, params, 0, 0);
908 String [] params = {strName, strExt, strAppKey};
909 return QtXnl.array_int2(0, Constant.CHECKASSOCIATED, params, 0, 0);
void ON_HOTSPOTCLICK(int position, int modifiers)
void onInputMethodQuery()
void setOnFileSystemChangeListener(onFileSystemChangeListener l)
void onDeactivateControl()
void onHelpRequest(int x,int y)
void onNonClientAreaMouseButtonPress()
void onGraphicsSceneDragMove()
void setOnStatusListener(onStatusListener l)
void onAcceptDropsChange()
void ON_MACRORECORD(int msg, long wparam, long lparam)
void onToggle(bool checked)
void onPaint(int l,int t, int r,int b, long hpaint)
void onHoverMove(int x,int y)
void setOnSciEventListener(SciEventListener l)
void onApplicationStateChange()
QObject attachByName(@NotNilptr QObject newObj, String name)
void onLeaveWhatsThisMode()
void onFocusIn(bool focus, int reson)
bool onDragEnter(int l,int t,int r,int b)
void ON_AUTOCCOMPLETED(String selection, int position, int ch, int method)
void setOnFocusEventListener(onFocusEventListener l)
void onItemCollapsed(long item)
void ON_AUTOCSELECTION(String selection, int position)
void setOnUpdateListener(onUpdateListener l)
void onCurrentTextChange(String text)
void onGraphicsSceneDragLeave()
void onTabletTrackingChange()
void ON_MARGINCLICK(int position, int modifiers, int margin)
void onMouseButtonPress(int Button, int x, int y, int flags, int source)
void onGraphicsSceneMouseMove()
void onEnterWhatsThisMode()
void setOnTableWidgetEventListener(TableWidgetEventListener l)
void onFileChanged(String path)
void onItemPressed(long item, int column)
void onGraphicsSceneHoverMove()
void onShortcutOverride()
void ON_USERLISTSELECTION(String text, int wparam, int ch, int listCompletionMethod)
void onCellPress(int row,int column)
void onEnter(int x, int y)
void onGraphicsSceneDragEnter()
void onMouseTrackingChange()
void onGraphicsSceneContextMenu()
void onGraphicsSceneDrop()
void onCellChange(int row,int column)
void ON_CALLTIPCLICK(int direction)
void onCurrentItemChanged(long cur, long previous)
bool onDragMove(int l,int t,int r,int b)
void onNotification(long eventid)
void onGraphicsSceneResize()
void onGraphicsSceneMove()
bool onDragLeave(int l,int t,int r,int b)
void onContextMenu(int x,int y, int reson)
void onLayoutDirectionChange()
void ON_HOTSPOTRELEASECLICK(int position, int modifiers)
void onHoverLeave(int x,int y)
void onStatusTip(String tips)
void onDynamicPropertyChange()
void onEmbeddingControl()
void onWindowDeactivate()
void onItemEntered(long item, int column)
void setOnScopeEventListener(onScopeEventListener l)
void onNetworkReplyUpdated()
void setOnComboBoxEventListener(onComboBoxEventListener l)
void onItemEnter(long item)
bool onKeyRelease(int key, bool repeat, int count, String text, int scanCode, int virtualKey, int modifier)
void onMacGLWindowChange()
void setOnEventListener(onEventListener l)
void onFocusAboutToChange(bool focus, int reson)
static bool associateExt(String strName, String strExt, String strAppName, String args, String strAppKey, String strDefaultIcon, String strDescribe)
void QON_SELCHANGED(bool yes)
void onKeyboardLayoutChange()
void ON_HOTSPOTDOUBLECLICK(int position, int modifiers)
void setOnLayoutEventListener(onLayoutEventListener l)
void onRequestSoftwareInputPanel()
void onToolTip(int x,int y)
void setOnEditEventListener(onEditEventListener l)
void onGraphicsSceneMouseRelease()
void onNonClientAreaMouseButtonRelease()
void onTextChanged(String text)
void setOnMouseEventListener(onMouseEventListener l)
void onActivationChange()
void onApplicationDeactivate()
void onGraphicsSceneWheel()
void runOnUi(Runnable task)
void onStateMachineSignal()
void ON_MODIFIED(int position, int modType, String text, int length, int linesAdded, int line, int foldLevelNow, int foldLevelPrev, int token, int annotationLinesAdded)
void onEnumPropertyValueChanged(long prop, int item)
void ON_DOUBLECLICK(int position, int line, int modifiers)
void onItemPress(long item)
void onCellActived(int row,int column)
void onShortcut(int key, int shortcutId, bool ambig)
void onCellClick(int row,int column)
void onTabletEnterProximity()
void ON_SAVEPOINTREACHED()
void onItemChanged(long item, int column)
bool onKeyPress(int key, bool repeat, int count, String text, int scanCode, int virtualKey, int modifier)
void onMouseButtonRelease(int Button, int x, int y, int flags, int source)
void onWheel(int button, int x,int y,int Orientation,int delta, bool inverted)
void setOnActivateListener(onActivateListener l)
void onOrientationChange()
void onResize(int w, int h, int oldw, int oldh)
void setOnDragListener(onDragListener l)
void ON_UPDATEUI(int updated)
void onHoverEnter(int x,int y)
bool attach(@NotNilptr QObject obj)
void onItemChange(long item)
void setOnContextMenuListener(onContextMenuListener l)
void onWindowChangeInternal()
QObject findByName(String name)
void onCloseSoftwareInputPanel()
void onCellDBClick(int row,int column)
void onWindowStateChange(int oldstate, int state)
void ON_STYLENEEDED(int position)
void onItemSelected(int id)
void onSelectionChanged()
void onTextEdited(String text)
void onItemDBClick(long item)
void onGraphicsSceneMouseDoubleClick()
void onGraphicsSceneHoverEnter()
void onVariantPropertyValueChanged(long prop, int dataType, String stringValue)
void onStateMachineWrapped()
void onItemExpanded(long item)
static void runOnThread(Runnable task)
void onItemClick(long item)
void onCursorPositionChanged(int n,int o)
static bool checkAssociate(String strName, String strExt, String strAppKey)
void ON_DWELLSTART(int position, int x, int y)
void setName(String name)
void ON_INDICATORCLICK(int position, int modifiers)
void ON_DWELLEND(int position, int x, int y)
void onItemActived(long item, int column)
void onGraphicsSceneHoverLeave()
void onMacGLClearDrawable()
void onApplicationActivate()
void onNonClientAreaMouseButtonDblClick()
void onFocusOut(bool focus, int reson)
void onContentsRectChange()
void setOnPaintListener(onPaintListener l)
void setOnTreeViewItemEvent(onTreeViewItemEvent l)
void onMouseMove(int Button, int x, int y, int flags, int source)
void onGraphicsSceneMousePress()
void onItemClicked(long item, int column)
void onDrop(Object object)
void ON_MARGINRIGHTCLICK(int position, int modifiers, int margin)
void onTabletLeaveProximity()
void ON_NEEDSHOWN(int position, int length)
void onDirChange(String path)
void setOnNotifyListener(onNotifyListener l)
void onScreenChangeInternal()
void onVariantPropertyAttributeChanged(long prop,String strAttributr, int dataType, String stringValue)
void onGraphicsSceneHelp()
void onStyleAnimationUpdate()
final void onNotify(long eventid)
void ON_MODIFYATTEMPTRO()
void setOnKeyEventListener(onKeyEventListener l)
void ON_AUTOCSELECTION(String selection, int position, int ch, int method)
void onNonClientAreaMouseMove()
void ON_CHARADDED(int charadded)
void onWhatsThis(int x,int y)
void onParentAboutToChange()
void onItemActived(long item)
void onWhatsThisClicked()
void ON_USERLISTSELECTION(String text, int wparam)
void onCellEnter(int row,int column)
void onItemSelectionChanged()
void onMove(int x,int y,int oldx,int oldy)
void ON_INDICATORRELEASE(int position, int modifiers)
void onMouseButtonDblClick(int Button, int x, int y, int flags, int source)
void ON_AUTOCCHARDELETED()
void setOnClickListener(onClickListener l)
void onItemDoubleClicked(long item, int column)
void onClick(bool checked)