glimmer-cw-cdatetime-nebula 1.4.0.2.1 → 1.5.0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +53 -0
- data/README.md +105 -37
- data/VERSION +1 -1
- data/app/assets/stylesheets/glimmer_cw_cdatetime_nebula/clocklet.min.css +1 -0
- data/app/assets/stylesheets/glimmer_cw_cdatetime_nebula/glimmer_cw_cdatetime_nebula.css +15 -0
- data/lib/glimmer-cw-cdatetime-nebula.rb +29 -16
- data/lib/glimmer-cw-cdatetime-nebula/ext/glimmer/swt/c_date_time_proxy.rb +7 -7
- data/lib/glimmer-cw-cdatetime-nebula/ext/glimmer/swt/cdt_proxy.rb +11 -10
- data/lib/glimmer-cw-cdatetime-nebula/vendor/clocklet.min.js +1 -0
- data/lib/glimmer_cw_cdatetime_nebula/engine.rb +9 -0
- data/lib/views/nebula/c_date_time.rb +3 -3
- data/opal/glimmer-cw-cdatetime-nebula/ext/glimmer/cdt.rb +499 -0
- data/opal/glimmer-cw-cdatetime-nebula/ext/glimmer/swt/c_date_time_proxy.rb +326 -0
- data/opal/views/nebula/c_date_time.rb +1 -0
- data/samples/nebula/c_date_time_gallery.rb +39 -15
- data/vendor/nebula/{org.eclipse.nebula.cwt_1.1.0.jar → org.eclipse.nebula.cwt_1.1.0.202007241204.jar} +0 -0
- data/vendor/nebula/org.eclipse.nebula.widgets.cdatetime_1.5.0.202007241204.jar +0 -0
- metadata +24 -29
- data/vendor/nebula/org.eclipse.nebula.widgets.cdatetime_1.4.0.jar +0 -0
@@ -1,5 +1,5 @@
|
|
1
1
|
# Copyright (c) 2020 - Andy Maleh
|
2
|
-
#
|
2
|
+
#
|
3
3
|
# Permission is hereby granted, free of charge, to any person obtaining
|
4
4
|
# a copy of this software and associated documentation files (the
|
5
5
|
# "Software"), to deal in the Software without restriction, including
|
@@ -7,10 +7,10 @@
|
|
7
7
|
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
8
|
# permit persons to whom the Software is furnished to do so, subject to
|
9
9
|
# the following conditions:
|
10
|
-
#
|
10
|
+
#
|
11
11
|
# The above copyright notice and this permission notice shall be
|
12
12
|
# included in all copies or substantial portions of the Software.
|
13
|
-
#
|
13
|
+
#
|
14
14
|
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
15
|
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
16
|
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
@@ -20,21 +20,22 @@
|
|
20
20
|
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
21
|
|
22
22
|
require 'glimmer/swt/style_constantizable'
|
23
|
+
require 'glimmer-cw-cdatetime-nebula/ext/glimmer/cdt' if RUBY_ENGINE == 'opal'
|
23
24
|
|
24
25
|
module Glimmer
|
25
26
|
module SWT
|
26
27
|
# Proxy for org.eclipse.nebula.widgets.cdatetime.CDT
|
27
28
|
#
|
28
29
|
# Follows the Proxy Design Pattern
|
29
|
-
class CDTProxy
|
30
|
-
include Glimmer::SWT::StyleConstantizable
|
30
|
+
class CDTProxy
|
31
|
+
include Glimmer::SWT::StyleConstantizable
|
31
32
|
|
32
33
|
class << self
|
33
34
|
JAVA_IMPORT = 'org.eclipse.nebula.widgets.cdatetime.CDT'
|
34
35
|
|
35
|
-
java_import JAVA_IMPORT
|
36
|
+
java_import JAVA_IMPORT if RUBY_ENGINE == 'jruby'
|
36
37
|
|
37
|
-
def constant_java_import
|
38
|
+
def constant_java_import
|
38
39
|
JAVA_IMPORT
|
39
40
|
end
|
40
41
|
|
@@ -46,10 +47,10 @@ module Glimmer
|
|
46
47
|
CDT::NONE
|
47
48
|
end
|
48
49
|
|
49
|
-
def extra_styles
|
50
|
-
{}
|
51
|
-
end
|
52
50
|
end
|
51
|
+
|
53
52
|
end
|
53
|
+
|
54
54
|
end
|
55
|
+
|
55
56
|
end
|
@@ -0,0 +1 @@
|
|
1
|
+
!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):(t="undefined"!=typeof globalThis?globalThis:t||self).clocklet=e()}(this,function(){"use strict";function r(t,e,o){return t=String(t),!e||!isFinite(e)||t.length>=e?t:n(e-t.length,o)+t}function t(t,e,o){return t=String(t),!e||!isFinite(e)||t.length>=e?t:t+n(e-t.length,o)}function n(t,e){for(var o=e=null==e||""===e?" ":String(e);o.length<t;)o+=e;return o.substr(0,t)}function o(){for(var t=0,e=arguments.length;t<e;++t){var o=arguments[t];if("number"==typeof o)return o;if("string"==typeof o){o=parseFloat(o);if(isFinite(o))return o}}}var l=1e3,c=60*l,i=60*c,e=12*i,a=24*i;function u(){return(Date.now()-(new Date).getTimezoneOffset()*c)%a}function s(t){t=Math.floor(t)%a;return 0<=t?t:t+a}function p(t){return e<=t?t-e:t}function k(t){return t<e?t+e:t}function d(t,e){switch(t=s(t),e&&String(e)[0].toLowerCase()){case"a":return p(t);case"p":return k(t);default:return t}}function f(t){switch(typeof t){case"number":return s(t);case"string":return function(t){if(!(t=t&&String(t).replace(/[\uff00-\uffef]/g,function(t){return String.fromCharCode(t.charCodeAt(0)-65248)}).replace(/\s/g,"").replace(/(a|p)\.?m?\.?$/i,function(t,e){return e.toLowerCase()})))return 0;if("now"===t.toLowerCase())return u();t=t.match(/^([+-]?[0-9]{1,2})(?:([0-9]{2})(?:([0-9]{2})([0-9]*))?)?(a|p)?$/i)||t.match(/^([+-]?[0-9]*\.[0-9]*)()()()(a|p)?$/i)||t.match(/^([+-]?[0-9]*\.?[0-9]*):([+-]?[0-9]*\.?[0-9]*)(?::([+-]?[0-9]*\.?[0-9]*))?()(a|p)?$/i);return t?d((t[1]?parseFloat(t[1])*i:0)+(t[2]?parseFloat(t[2])*c:0)+(t[3]?parseFloat(t[3])*l:0)+(t[4]?1e3*parseFloat("0."+t[4]):0),t[5]):NaN}(t);case"object":if(t)return function(t){if("number"==typeof t.totalMilliseconds)return s(t.totalMilliseconds);var e=o(t.h,t.hour,t.hours,0)*i+o(t.m,t.minute,t.minutes,0)*c+o(t.s,t.second,t.seconds,0)*l+o(t.S,t.millisecond,t.milliseconds,0);return!0!==t.am&&!1!==t.pm?!0!==t.pm&&!1!==t.am?d(e,t.a):k(e):p(e)}(t instanceof Array?{h:t[0],m:t[1],s:t[2],S:t[3]}:t)}return NaN}function b(){return/\\.|HH?|hh?|kk?|mm?|ss?|S{1,3}|AA?|aa?|_H|_h|_k|_m|_s/g}var h={H:m(0,23),HH:m(0,23,2,"0"),_H:m(0,23,2),h:m(1,12),hh:m(1,12,2,"0"),_h:m(1,12,2),k:m(0,11),kk:m(0,11,2,"0"),_k:m(0,23,2),m:m(0,59),mm:m(0,59,2,"0"),_m:m(0,59,2),s:m(0,59),ss:m(0,59,2,"0"),_s:m(0,59,2),S:m(0,9),SS:m(0,99,2,"0"),SSS:m(0,999,3,"0"),a:function(e){return function(t){return"pm"===e?"am":"pm"}},A:function(e){return function(t){return"PM"===e?"AM":"PM"}},aa:function(e){return function(t){return"p.m."===e?"a.m.":"p.m."}},AA:function(e){return function(t){return"P.M."===e?"A.M.":"P.M."}}};function m(c,i,a,u){return void 0===a&&(a=1),function(l){return function(t,e){var o,n,o=(o=parseInt(l,10)+t,n=c,t=i,e?(o=(o-n)%(++t-n))<0?o+t:o+n:o<n?n:t<o?t:o);return isNaN(o)?void 0:r(o,a,u)}}}function y(t,e,o){for(var n=v(t),l=0,c=0,i=0;i<n.length;++i){var a=n[i];if(a.literal){var u=e.indexOf(a.property,l);if(-1===u||o<=u){if(0===i)return;var r=e.slice(c,u);return{property:s=n[i-1].property,index:c,value:r,adjust:h[s](r)}}c=l=u+a.property.length}else"_"===a.property[0]&&" "===e[l]&&++l}t=n[n.length-1];if(t&&!t.literal){var s,r=e.slice(l);return{property:s=t.property,index:l,value:r,adjust:h[s](r)}}}function v(t){for(var e,o=b(),n=[],l=0;e=o.exec(t);){var c=e.index,i=o.lastIndex;l!==c&&n.push({index:l,property:t.slice(l,c),literal:!0}),"\\"===e[0][0]?n.push({index:c,property:e[0].slice(1),literal:!0}):n.push({index:c,property:e[0],literal:!1}),l=i}return l<t.length&&n.push({index:l,property:t.slice(l),literal:!0}),n}var g=(Object.defineProperty(O.prototype,"hour",{get:function(){return Math.floor(this._totalMilliseconds/i)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"hour12",{get:function(){return(this.hour+11)%12+1},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"minute",{get:function(){return Math.floor(this._totalMilliseconds%i/c)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"second",{get:function(){return Math.floor(this._totalMilliseconds%c/l)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"millisecond",{get:function(){return this._totalMilliseconds%l},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"am",{get:function(){return this.hour<12},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"pm",{get:function(){return 12<=this.hour},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"hours",{get:function(){return this.hour},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"hours12",{get:function(){return this.hour12},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"minutes",{get:function(){return this.minute},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"seconds",{get:function(){return this.second},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"milliseconds",{get:function(){return this.millisecond},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"H",{get:function(){return this.invalid?"-":String(this.hour)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"h",{get:function(){return this.invalid?"-":String(this.hour12)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"k",{get:function(){return this.invalid?"-":String((this.hour+23)%24+1)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"m",{get:function(){return this.invalid?"-":String(this.minute)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"s",{get:function(){return this.invalid?"-":String(this.second)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"S",{get:function(){return this.invalid?"-":String(Math.floor(this.millisecond/100))},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"SS",{get:function(){return this.invalid?"--":t(Math.floor(this.millisecond/10),2,"0")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"SSS",{get:function(){return this.invalid?"---":t(this.millisecond,3,"0")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"a",{get:function(){return this.invalid?"--":this.am?"am":"pm"},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"A",{get:function(){return this.invalid?"--":this.am?"AM":"PM"},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"aa",{get:function(){return this.invalid?"----":this.am?"a.m.":"p.m."},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"AA",{get:function(){return this.invalid?"----":this.am?"A.M.":"P.M."},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"HH",{get:function(){return this.invalid?"--":r(this.H,2,"0")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"_H",{get:function(){return this.invalid?"--":r(this.H,2," ")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"hh",{get:function(){return this.invalid?"--":r(this.h,2,"0")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"_h",{get:function(){return this.invalid?"--":r(this.h,2," ")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"kk",{get:function(){return this.invalid?"--":r(this.k,2,"0")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"_k",{get:function(){return this.invalid?"--":r(this.k,2," ")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"mm",{get:function(){return this.invalid?"--":r(this.m,2,"0")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"_m",{get:function(){return this.invalid?"--":r(this.m,2," ")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"ss",{get:function(){return this.invalid?"--":r(this.s,2,"0")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"_s",{get:function(){return this.invalid?"--":r(this.s,2," ")},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"HHmm",{get:function(){return this.HH+":"+this.mm},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"HHmmss",{get:function(){return this.HHmm+":"+this.ss},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"HHmmssSSS",{get:function(){return this.HHmmss+"."+this.SSS},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"totalMilliseconds",{get:function(){return this._totalMilliseconds},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"totalSeconds",{get:function(){return Math.floor(this._totalMilliseconds/l)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"totalMinutes",{get:function(){return Math.floor(this._totalMilliseconds/c)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"valid",{get:function(){return 0<=this._totalMilliseconds&&this._totalMilliseconds<a},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"invalid",{get:function(){return!this.valid},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"startOfHour",{get:function(){return new O(this._totalMilliseconds-this._totalMilliseconds%i)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"startOfMinute",{get:function(){return new O(this._totalMilliseconds-this._totalMilliseconds%c)},enumerable:!0,configurable:!0}),Object.defineProperty(O.prototype,"startOfSecond",{get:function(){return new O(this._totalMilliseconds-this._totalMilliseconds%l)},enumerable:!0,configurable:!0}),O.prototype.ifInvalid=function(t){return this.valid?this:new O(f(t))},O.prototype.startOf=function(t){switch(t){case"hour":return this.startOfHour;case"minute":return this.startOfMinute;case"second":return this.startOfSecond;default:return this}},O.prototype.toString=function(){return this.HHmmssSSS},O.prototype.format=function(t){return e=this,String(t).replace(b(),function(t){return"\\"===t[0]?t[1]:e[t]});var e},O.prototype.with=function(t){return new O(f({h:o(t.h,t.hour,t.hours,this.hour),m:o(t.m,t.minute,t.minutes,this.minute),s:o(t.s,t.second,t.seconds,this.second),S:o(t.S,t.millisecond,t.milliseconds,this.millisecond),am:!0===t.am||!1===t.pm||"am"===t.a||"pm"!==t.a&&void 0}))},O.prototype.plus=function(t){t=f(t);return 0===t?this:new O(this._totalMilliseconds+t)},O.prototype.minus=function(t){t=f(t);return 0===t?this:new O(this._totalMilliseconds-t)},O.prototype.equals=function(t){return 0===this.compareTo(t)},O.prototype.compareTo=function(t){return this._totalMilliseconds-f(t)},O.prototype.isBefore=function(t){return this.compareTo(t)<0},O.prototype.isBeforeOrEqual=function(t){return this.compareTo(t)<=0},O.prototype.isAfter=function(t){return 0<this.compareTo(t)},O.prototype.isAfterOrEqual=function(t){return 0<=this.compareTo(t)},O.prototype.isBetweenExclusive=function(t,e){return this.isAfter(t)&&this.isBefore(e)},O.prototype.isBetweenInclusive=function(t,e){return this.isAfterOrEqual(t)&&this.isBeforeOrEqual(e)},O);function O(t){this._totalMilliseconds=t}function E(t){return null==t?P:t instanceof g?t:0===(t=f(t))?S:isNaN(t)?P:new g(t)}var S=new g(0),P=new g(NaN);function j(t,e,o){void 0===o&&(o=P);for(var n=o,l=0,c=t.length;l<c;++l){var i=E(t[l]);i.valid&&(n=e(n,i,l,t))}return n}function _(t){var e=document.createEvent("CustomEvent");e.initCustomEvent("input",!0,!1,"complete"),t.dispatchEvent(e)}E.prototype=g.prototype,E.INVALID=P,E.ZERO=S,E.now=function(){return new g(u())},E.min=function(){return j(arguments,function(t,e){return t.invalid||e.isBefore(t)?e:t})},E.max=function(){return j(arguments,function(t,e){return t.invalid||e.isAfter(t)?e:t})};var w,M,x=function(){return(x=Object.assign||function(t){for(var e,o=1,n=arguments.length;o<n;o++)for(var l in e=arguments[o])Object.prototype.hasOwnProperty.call(e,l)&&(t[l]=e[l]);return t}).apply(this,arguments)};void 0===window.ontouchend?M=!1:(w=window.ontouchend,M=(window.ontouchend=void 0)!==window.ontouchend,window.ontouchend=w);var H=M;function L(t,e,o,n,l){var c=document.createEvent("CustomEvent");return c.initCustomEvent(e,o,n,l),c.preventDefault=function(){Object.defineProperty(this,"defaultPrevented",{get:function(){return!0}})},t.dispatchEvent(c),c}function A(t,e){return t.getAttribute("data-clocklet-"+e)}function C(t,e,o){t.setAttribute("data-clocklet-"+e,o)}var N=(T.prototype.value=function(t){this.hand.style.transform="rotate("+360*t/this.maxValue+"deg)";var e="clocklet-tick--selected",o=this.dial.getElementsByClassName(e)[0],t=this.dial.querySelector('[data-clocklet-tick-value="'+t+'"]');o!==t&&(o&&o.classList.remove(e),t&&t.classList.add(e))},T.prototype._onDragStart=function(t){var e;t.touches&&1<t.touches.length?this.dragging=!1:(this.dragging=!0,(e=A(t.target,"tick-value"))&&this.setValue(e),t.preventDefault(),L(this.dial,"clocklet.dragstart",!0,!1))},T.prototype._onDrag=function(t){var e,o,n;this.dragging&&(e=t.targetTouches?t.targetTouches[0]:t,(n=(o=document.elementFromPoint(e.clientX,e.clientY))&&A(o,"tick-value"))&&this.dial.contains(o)?this.setValue(n):(o=this.dial.getBoundingClientRect(),n=e.clientX-o.left-o.width/2,o=e.clientY-o.top-o.height/2,n=Math.atan2(o,n),this.setValue(Math.round(n*this.maxValue/(2*Math.PI)+this.maxValue/4+this.maxValue)%this.maxValue)),t.preventDefault())},T.prototype._onDragEnd=function(t){this.dragging=!1,t.preventDefault(),L(this.dial,"clocklet.dragend",!0,!1)},T);function T(t,e,o){this.dial=t,this.maxValue=e,this.setValue=o,this.hand=this.dial.getElementsByClassName("clocklet-hand")[0],this.dragging=!1,window.PointerEvent?(t.addEventListener("pointerdown",this._onDragStart.bind(this)),addEventListener("pointermove",this._onDrag.bind(this),!0),addEventListener("pointerup",this._onDragEnd.bind(this),!0)):H?(t.addEventListener("touchstart",this._onDragStart.bind(this)),t.addEventListener("touchmove",this._onDrag.bind(this)),t.addEventListener("touchend",this._onDragEnd.bind(this))):(t.addEventListener("mousedown",this._onDragStart.bind(this)),addEventListener("mousemove",this._onDrag.bind(this),!0),addEventListener("mouseup",this._onDragEnd.bind(this),!0))}var D={className:"",format:"HH:mm",placement:"bottom",alignment:"left",appendTo:"body",zIndex:"",dispatchesInputEvents:!0};function I(t){if(t){for(var e={},o=0,n=t.split(";");o<n.length;o++){var l=n[o],c=l.indexOf(":");e[l.slice(0,c).trim().replace(/[a-zA-Z0-9_]-[a-z]/g,function(t){return t[0]+t[2].toUpperCase()})]=l.slice(c+1).trim()}return e}}var B='<div class="clocklet"><div class="clocklet-plate"><div class="clocklet-dial clocklet-dial--minute"><div class="clocklet-hand clocklet-hand--minute"></div><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="0" style="left:50%;top:11%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="1" style="left:54.8%;top:4.3%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="2" style="left:59.6%;top:5%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="3" style="left:64.2%;top:6.3%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="4" style="left:68.7%;top:8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="5" style="left:69.5%;top:16.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="6" style="left:77%;top:12.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="7" style="left:80.8%;top:15.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="8" style="left:84.2%;top:19.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="9" style="left:87.2%;top:23%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="10" style="left:83.8%;top:30.5%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="11" style="left:92%;top:31.3%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="12" style="left:93.7%;top:35.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="13" style="left:95%;top:40.4%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="14" style="left:95.7%;top:45.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="15" style="left:89%;top:50%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="16" style="left:95.7%;top:54.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="17" style="left:95%;top:59.6%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="18" style="left:93.7%;top:64.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="19" style="left:92%;top:68.7%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="20" style="left:83.8%;top:69.5%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="21" style="left:87.2%;top:77%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="22" style="left:84.2%;top:80.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="23" style="left:80.8%;top:84.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="24" style="left:77%;top:87.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="25" style="left:69.5%;top:83.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="26" style="left:68.7%;top:92%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="27" style="left:64.2%;top:93.7%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="28" style="left:59.6%;top:95%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="29" style="left:54.8%;top:95.7%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="30" style="left:50%;top:89%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="31" style="left:45.2%;top:95.7%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="32" style="left:40.4%;top:95%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="33" style="left:35.8%;top:93.7%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="34" style="left:31.3%;top:92%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="35" style="left:30.5%;top:83.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="36" style="left:23%;top:87.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="37" style="left:19.2%;top:84.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="38" style="left:15.8%;top:80.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="39" style="left:12.8%;top:77%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="40" style="left:16.2%;top:69.5%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="41" style="left:8%;top:68.7%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="42" style="left:6.3%;top:64.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="43" style="left:5%;top:59.6%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="44" style="left:4.3%;top:54.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="45" style="left:11%;top:50%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="46" style="left:4.3%;top:45.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="47" style="left:5%;top:40.4%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="48" style="left:6.3%;top:35.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="49" style="left:8%;top:31.3%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="50" style="left:16.2%;top:30.5%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="51" style="left:12.8%;top:23%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="52" style="left:15.8%;top:19.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="53" style="left:19.2%;top:15.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="54" style="left:23%;top:12.8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="55" style="left:30.5%;top:16.2%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="56" style="left:31.3%;top:8%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="57" style="left:35.8%;top:6.3%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="58" style="left:40.4%;top:5%"></button><button class="clocklet-tick clocklet-tick--minute" type="button" data-clocklet-tick-value="59" style="left:45.2%;top:4.3%"></button></div><div class="clocklet-dial clocklet-dial--hour"><div class="clocklet-hand clocklet-hand--hour"></div><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="0" style="left:50%;top:11%"></button><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="1" style="left:69.5%;top:16.2%"></button><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="2" style="left:83.8%;top:30.5%"></button><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="3" style="left:89%;top:50%"></button><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="4" style="left:83.8%;top:69.5%"></button><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="5" style="left:69.5%;top:83.8%"></button><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="6" style="left:50%;top:89%"></button><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="7" style="left:30.5%;top:83.8%"></button><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="8" style="left:16.2%;top:69.5%"></button><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="9" style="left:11%;top:50%"></button><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="10" style="left:16.2%;top:30.5%"></button><button class="clocklet-tick clocklet-tick--hour" type="button" data-clocklet-tick-value="11" style="left:30.5%;top:16.2%"></button></div><div class="clocklet-ampm"></div><div class="clocklet-hand-origin"></div></div></div>';function V(t,e){return z(t,e,/[Hhk]$/)}function R(t,e){return z(t,e,/a/i)}function z(t,e,o){for(var n=0,l=0,c=v(e);l<c.length;l++){var i=c[l];if(i.literal)n+=i.property.length;else{var a=t[i.property];if(o.test(i.property))return{index:n,value:a};n+=a.length}}}var F=["position","left","top","right","bottom","marginLeft","marginTop","marginRight","marginBottom"],q=matchMedia("(hover: none)").matches,$=(Z.prototype.open=function(e,t){var o=this,n=x(Object.create(this.defaultOptions),t),l=e.getBoundingClientRect(),c=getComputedStyle(e),i=this.container,a=this.root,t={options:n};L(e,"clocklet.opening",!0,!0,t).defaultPrevented||(this.input=e,this.dispatchesInputEvents=n.dispatchesInputEvents,C(a,"placement",n.placement),C(a,"alignment",n.alignment),C(a,"format",n.format),C(a,"append-to",n.appendTo),a.className="clocklet clocklet--showing "+(q?"":"clocklet--hoverable ")+n.className,i.style.zIndex=""!==n.zIndex?n.zIndex:(parseInt(c.zIndex,10)||0)+1,"parent"===n.appendTo?e.parentElement.insertBefore(i,e):i.parentElement!==document.body&&document.body.appendChild(i),"top"===n.placement?(a.style.top="",a.style.bottom="0"):(a.style.top=l.height+"px",a.style.bottom=""),"right"===n.alignment?(a.style.left="",a.style.right="-"+l.width+"px"):("center"===n.alignment?a.style.left=(e.offsetWidth-a.offsetWidth)/2+"px":a.style.left="0",a.style.right=""),"fixed"===c.position||"parent"===n.appendTo&&"absolute"===c.position?(this._relocate=void 0,K(i.style,c,F)):(K(i.style,{},F),"parent"===n.appendTo?"flex"===(n=getComputedStyle(e.parentElement)).display||"inline-flex"===n.display?(i.style.position="absolute",this._relocate=function(){i.style.left=e.offsetLeft+"px",i.style.top=e.offsetTop+"px"}):(i.style.position="relative",this._relocate=function(){i.style.left=i.style.top="",i.style.left=e.offsetLeft-i.offsetLeft+"px",i.style.top=e.offsetTop-i.offsetTop+"px"}):(i.style.position="absolute",this._relocate=function(){var t=e.getBoundingClientRect();i.style.left=document.documentElement.scrollLeft+document.body.scrollLeft+t.left+"px",i.style.top=document.documentElement.scrollTop+document.body.scrollTop+t.top+"px"}),this._relocate()),this.updateHighlight(),setTimeout(function(){a.classList.remove("clocklet--showing"),o.input&&a.classList.add("clocklet--shown")}),L(e,"clocklet.opened",!0,!1,t))},Z.prototype.close=function(){var t=this.input,e={};t&&(L(t,"clocklet.closing",!0,!0,e).defaultPrevented?t.focus():(this.input=void 0,this.root.classList.remove("clocklet--shown"),L(t,"clocklet.closed",!0,!1,e)))},Z.prototype.inline=function(t,e){var o=void 0===e?{}:e,n=o.input,e=o.format,o=new Z(this.defaultOptions);return t.appendChild(o.container),o.container.classList.add("clocklet-container--inline"),o.root.classList.add("clocklet--inline"),o.dispatchesInputEvents=o.defaultOptions.dispatchesInputEvents,e=e||o.defaultOptions.format,C(o.root,"format",e),n||((n=t.appendChild(document.createElement("input"))).style.display="none"),n.setAttribute("data-clocklet","format:"+e),n.setAttribute("data-clocklet-inline",""),o.input=n,o.updateHighlight(),o},Z.prototype.value=function(t){var e,o,n;this.input&&(e=this.input.value,o="string"==typeof t?E(t):E(this.input.value).with(void 0!==t.a?t:{h:t.h,m:t.m,a:A(this.ampm,"ampm")}),n=A(this.root,"format"),this.input.value=o.format(n),"text"!==this.input.type||"object"!=typeof t||(n=void 0!==t.h?V(o,n):void 0!==t.m?z(o,n,/m$/):void 0!==t.a?R(o,n)||V(o,n):void 0)&&this.input.setSelectionRange(n.index,n.index+n.value.length),this.dispatchesInputEvents&&this.input.value!==e&&L(this.input,"input",!0,!1,{time:o}))},Z.prototype.updateHighlight=function(){var t;this.input&&((t=this.input.value?E(this.input.value):E.INVALID).valid?(C(this.root,"value",t.HHmm),this.hour.value(t.hour%12),this.minute.value(t.minute),C(this.ampm,"ampm",t.a)):(C(this.root,"value",""),this.hour.value(-1),this.minute.value(-1),C(this.ampm,"ampm","am")),t=R(t.valid?t:E.ZERO,A(this.root,"format")),C(this.ampm,"ampm-formatted",t&&t.value||""))},Z);function Z(t){var e,o=this;this.container=((e=document.createElement("div")).className="clocklet-container",e.innerHTML=B,e),this.root=this.container.firstElementChild,this.plate=this.root.firstElementChild,this.hour=new N(this.plate.getElementsByClassName("clocklet-dial--hour")[0],12,function(t){return o.value({h:t})}),this.minute=new N(this.plate.getElementsByClassName("clocklet-dial--minute")[0],60,function(t){return o.value({m:t})}),this.ampm=this.plate.getElementsByClassName("clocklet-ampm")[0],this.defaultOptions=x(Object.create(D),t),addEventListener("input",function(t){return t.target===o.input&&o.updateHighlight()},!0),this.root.addEventListener("mousedown",function(t){return t.preventDefault()}),this.ampm.addEventListener("mousedown",function(){return o.value({a:"pm"===A(o.ampm,"ampm")?"am":"pm"})}),this.root.addEventListener("clocklet.dragstart",function(){return o.root.classList.add("clocklet--dragging")}),this.root.addEventListener("clocklet.dragend",function(){return o.root.classList.remove("clocklet--dragging")});t=function(){return o._relocate&&o._relocate()};addEventListener("resize",t),addEventListener("orientationchange",t)}function K(t,e,o){for(var n=0,l=o;n<l.length;n++){var c=l[n];t[c]=e[c]||""}}var W,X,Y,U,G,J,Q={dataAttributeName:"clocklet",formatSelector:function(t){t=I(t.getAttribute("data-clocklet"));return t&&t.format}};return G=(U=Q)&&U.dataAttributeName||"lenientime",J=U&&U.formatSelector||function(t){return t.dataset.lenientime},addEventListener("change",function(t){var e=t.target,o=e.value,t=e.dataset;o&&G in t&&((t=(t=E(o)).valid?t.format(J(e)||"HH:mm"):"")!==o&&(e.value=t,_(e)))},!0),X=(W=Q)&&W.dataAttributeName||"lenientime",Y=W&&W.formatSelector||function(t){return t.dataset.lenientime},W&&W.amountSelector,addEventListener("keydown",function(t){var e,o,n,l,c=t.which;38!==c&&40!==c||t.altKey||t.ctrlKey||t.metaKey||(n=(e=t.target).dataset,X in n&&(t.preventDefault(),o=Y(e)||"HH:mm",(n=e.value)?(l=null===(t=e.selectionStart)?void 0:y(o,n,t))&&(t=(38===c?1:-1)*(W&&W.amountSelector&&W.amountSelector(e)||1),void 0!==(c=l.adjust(t,!0))&&(t=l.index,e.value=n.slice(0,t)+c+n.slice(t+l.value.length),e.setSelectionRange(t,t+c.length),_(e))):(e.value=E.ZERO.format(o),(l=y(o,e.value,0))&&e.setSelectionRange(l.index,l.index+l.value.length),_(e))))},!0),function(t){void 0===t&&(t={});var e,o=new $(t.defaultOptions),n=t.target||"input[data-clocklet]:not([data-clocklet-inline])",l=t.optionsSelector||function(t){return I(t.getAttribute("data-clocklet"))},t=o.close.bind(o);return n instanceof Element?(n.addEventListener("focus",function(t){return o.open(t.target,l(t.target))}),n.addEventListener("blur",t)):(e="function"==typeof n?n:function(t){return(Element.prototype.matches||Element.prototype.msMatchesSelector).call(t,n)},addEventListener("focusin",function(t){t=t.target;e(t)&&o.open(t,l(t))},!0),addEventListener("focusout",t,!0)),o}()});
|
@@ -0,0 +1,9 @@
|
|
1
|
+
module GlimmerCwCdatetimeNebula
|
2
|
+
class Engine < ::Rails::Engine
|
3
|
+
isolate_namespace GlimmerCwCdatetimeNebula
|
4
|
+
|
5
|
+
initializer "glimmer_cw_cdatetime_nebula.assets.precompile" do |app|
|
6
|
+
app.config.assets.precompile += %w( glimmer_cw_cdatetime_nebula/glimmer_cw_cdatetime_nebula.css )
|
7
|
+
end
|
8
|
+
end
|
9
|
+
end
|
@@ -2,7 +2,7 @@ require 'glimmer-cw-cdatetime-nebula/ext/glimmer/swt/c_date_time_proxy'
|
|
2
2
|
|
3
3
|
module Nebula
|
4
4
|
# This modules just configures Glimmer to work with Nebula CDateTime
|
5
|
-
module CDateTime
|
5
|
+
module CDateTime
|
6
6
|
include Glimmer
|
7
7
|
|
8
8
|
keywords = ['c_date_time'] + Glimmer::SWT::WidgetProxy::KEYWORD_ALIASES.select do |key, value|
|
@@ -28,7 +28,7 @@ module Nebula
|
|
28
28
|
table_proxy.cancel_edit!
|
29
29
|
end
|
30
30
|
}
|
31
|
-
on_widget_selected { |event|
|
31
|
+
on_widget_selected { |event|
|
32
32
|
table_proxy.finish_edit! unless event.widget.is_open
|
33
33
|
}
|
34
34
|
on_widget_default_selected { |event|
|
@@ -37,7 +37,7 @@ module Nebula
|
|
37
37
|
}
|
38
38
|
table_editor_widget_proxy
|
39
39
|
end
|
40
|
-
}
|
40
|
+
}
|
41
41
|
end
|
42
42
|
end
|
43
43
|
end
|
@@ -0,0 +1,499 @@
|
|
1
|
+
# Copyright (c) 2020 Andy Maleh
|
2
|
+
#
|
3
|
+
# Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
# a copy of this software and associated documentation files (the
|
5
|
+
# "Software"), to deal in the Software without restriction, including
|
6
|
+
# without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
# distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
# permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
# the following conditions:
|
10
|
+
#
|
11
|
+
# The above copyright notice and this permission notice shall be
|
12
|
+
# included in all copies or substantial portions of the Software.
|
13
|
+
#
|
14
|
+
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
21
|
+
|
22
|
+
module Glimmer
|
23
|
+
# Acts as an Opal Ruby substitute for the Eclipse SWT class
|
24
|
+
# Up-to-date with SWT 4.17
|
25
|
+
module CDT
|
26
|
+
ABORT = 512
|
27
|
+
ALL = 1
|
28
|
+
ALPHA = 4
|
29
|
+
ALT = 65536
|
30
|
+
ALT_GR = 32768
|
31
|
+
APPLICATION_MODAL = 65536
|
32
|
+
ARROW = 4
|
33
|
+
ARROW_DOWN = 16777218
|
34
|
+
ARROW_LEFT = 16777219
|
35
|
+
ARROW_RIGHT = 16777220
|
36
|
+
ARROW_UP = 16777217
|
37
|
+
AUTO_TEXT_DIRECTION = 100663296
|
38
|
+
Activate = 26
|
39
|
+
Arm = 30
|
40
|
+
BACKGROUND = 8
|
41
|
+
BALLOON = 4096
|
42
|
+
BAR = 2
|
43
|
+
BEGINNING = 1
|
44
|
+
BITMAP = 0
|
45
|
+
BOLD = 1
|
46
|
+
BORDER = 2048
|
47
|
+
BORDER_DASH = 2
|
48
|
+
BORDER_DOT = 4
|
49
|
+
BORDER_SOLID = 1
|
50
|
+
BOTTOM = 1024
|
51
|
+
BREAK = 16777302
|
52
|
+
BS = 8
|
53
|
+
BUTTON1 = 524288
|
54
|
+
BUTTON2 = 1048576
|
55
|
+
BUTTON3 = 2097152
|
56
|
+
BUTTON4 = 8388608
|
57
|
+
BUTTON5 = 33554432
|
58
|
+
BUTTON_MASK = 45613056
|
59
|
+
CALENDAR = 1024
|
60
|
+
CALENDAR_WEEKNUMBERS = 16384
|
61
|
+
CANCEL = 256
|
62
|
+
CAPS_LOCK = 16777298
|
63
|
+
CAP_FLAT = 1
|
64
|
+
CAP_ROUND = 2
|
65
|
+
CAP_SQUARE = 3
|
66
|
+
CASCADE = 64
|
67
|
+
CENTER = 16777216
|
68
|
+
CHANGED = 2
|
69
|
+
CHECK = 32
|
70
|
+
CHROMIUM = 131072
|
71
|
+
CLIP_CHILDREN = 4096
|
72
|
+
CLIP_SIBLINGS = 8192
|
73
|
+
CLOSE = 64
|
74
|
+
COLOR_BLACK = 2
|
75
|
+
COLOR_BLUE = 9
|
76
|
+
COLOR_CYAN = 13
|
77
|
+
COLOR_DARK_BLUE = 10
|
78
|
+
COLOR_DARK_CYAN = 14
|
79
|
+
COLOR_DARK_GRAY = 16
|
80
|
+
COLOR_DARK_GREEN = 6
|
81
|
+
COLOR_DARK_MAGENTA = 12
|
82
|
+
COLOR_DARK_RED = 4
|
83
|
+
COLOR_DARK_YELLOW = 8
|
84
|
+
COLOR_GRAY = 15
|
85
|
+
COLOR_GREEN = 5
|
86
|
+
COLOR_INFO_BACKGROUND = 29
|
87
|
+
COLOR_INFO_FOREGROUND = 28
|
88
|
+
COLOR_LINK_FOREGROUND = 36
|
89
|
+
COLOR_LIST_BACKGROUND = 25
|
90
|
+
COLOR_LIST_FOREGROUND = 24
|
91
|
+
COLOR_LIST_SELECTION = 26
|
92
|
+
COLOR_LIST_SELECTION_TEXT = 27
|
93
|
+
COLOR_MAGENTA = 11
|
94
|
+
COLOR_RED = 3
|
95
|
+
COLOR_TEXT_DISABLED_BACKGROUND = 38
|
96
|
+
COLOR_TITLE_BACKGROUND = 31
|
97
|
+
COLOR_TITLE_BACKGROUND_GRADIENT = 32
|
98
|
+
COLOR_TITLE_FOREGROUND = 30
|
99
|
+
COLOR_TITLE_INACTIVE_BACKGROUND = 34
|
100
|
+
COLOR_TITLE_INACTIVE_BACKGROUND_GRADIENT = 35
|
101
|
+
COLOR_TITLE_INACTIVE_FOREGROUND = 33
|
102
|
+
COLOR_TRANSPARENT = 37
|
103
|
+
COLOR_WHITE = 1
|
104
|
+
COLOR_WIDGET_BACKGROUND = 22
|
105
|
+
COLOR_WIDGET_BORDER = 23
|
106
|
+
COLOR_WIDGET_DARK_SHADOW = 17
|
107
|
+
COLOR_WIDGET_DISABLED_FOREGROUND = 39
|
108
|
+
COLOR_WIDGET_FOREGROUND = 21
|
109
|
+
COLOR_WIDGET_HIGHLIGHT_SHADOW = 20
|
110
|
+
COLOR_WIDGET_LIGHT_SHADOW = 19
|
111
|
+
COLOR_WIDGET_NORMAL_SHADOW = 18
|
112
|
+
COLOR_YELLOW = 7
|
113
|
+
COMMAND = 4194304
|
114
|
+
COMPOSITION_CHANGED = 1
|
115
|
+
COMPOSITION_OFFSET = 2
|
116
|
+
COMPOSITION_SELECTION = 3
|
117
|
+
CONTROL = 262144
|
118
|
+
CR = 13
|
119
|
+
CTRL = 262144
|
120
|
+
CURSOR_APPSTARTING = 3
|
121
|
+
CURSOR_ARROW = 0
|
122
|
+
CURSOR_CROSS = 2
|
123
|
+
CURSOR_HAND = 21
|
124
|
+
CURSOR_HELP = 4
|
125
|
+
CURSOR_IBEAM = 19
|
126
|
+
CURSOR_NO = 20
|
127
|
+
CURSOR_SIZEALL = 5
|
128
|
+
CURSOR_SIZEE = 12
|
129
|
+
CURSOR_SIZEN = 10
|
130
|
+
CURSOR_SIZENE = 14
|
131
|
+
CURSOR_SIZENESW = 6
|
132
|
+
CURSOR_SIZENS = 7
|
133
|
+
CURSOR_SIZENW = 17
|
134
|
+
CURSOR_SIZENWSE = 8
|
135
|
+
CURSOR_SIZES = 11
|
136
|
+
CURSOR_SIZESE = 15
|
137
|
+
CURSOR_SIZESW = 16
|
138
|
+
CURSOR_SIZEW = 13
|
139
|
+
CURSOR_SIZEWE = 9
|
140
|
+
CURSOR_UPARROW = 18
|
141
|
+
CURSOR_WAIT = 1
|
142
|
+
Close = 21
|
143
|
+
Collapse = 18
|
144
|
+
DATE = 32
|
145
|
+
DBCS = 2
|
146
|
+
DEFAULT = -1
|
147
|
+
DEFER = 4
|
148
|
+
DEL = 127
|
149
|
+
DELIMITER_SELECTION = 131072
|
150
|
+
DIALOG_TRIM = 2144
|
151
|
+
DM_FILL_BACKGROUND = 2
|
152
|
+
DM_FILL_NONE = 1
|
153
|
+
DM_FILL_PREVIOUS = 3
|
154
|
+
DM_UNSPECIFIED = 0
|
155
|
+
DOUBLE_BUFFERED = 536870912
|
156
|
+
DOWN = 1024
|
157
|
+
DRAG = 1
|
158
|
+
DRAW_DELIMITER = 2
|
159
|
+
DRAW_MNEMONIC = 8
|
160
|
+
DRAW_TAB = 4
|
161
|
+
DRAW_TRANSPARENT = 1
|
162
|
+
DROP_DOWN = 4
|
163
|
+
Deactivate = 27
|
164
|
+
DefaultSelection = 14
|
165
|
+
Deiconify = 20
|
166
|
+
Dispose = 12
|
167
|
+
DragDetect = 29
|
168
|
+
EMBEDDED = 16777216
|
169
|
+
const_set 'END', 16777224
|
170
|
+
ERROR = 1
|
171
|
+
ERROR_CANNOT_BE_ZERO = 7
|
172
|
+
ERROR_CANNOT_GET_COUNT = 36
|
173
|
+
ERROR_CANNOT_GET_ENABLED = 31
|
174
|
+
ERROR_CANNOT_GET_ITEM = 8
|
175
|
+
ERROR_CANNOT_GET_ITEM_HEIGHT = 11
|
176
|
+
ERROR_CANNOT_GET_SELECTION = 9
|
177
|
+
ERROR_CANNOT_GET_TEXT = 12
|
178
|
+
ERROR_CANNOT_INVERT_MATRIX = 10
|
179
|
+
ERROR_CANNOT_SET_ENABLED = 30
|
180
|
+
ERROR_CANNOT_SET_MENU = 29
|
181
|
+
ERROR_CANNOT_SET_SELECTION = 28
|
182
|
+
ERROR_CANNOT_SET_TEXT = 13
|
183
|
+
ERROR_DEVICE_DISPOSED = 45
|
184
|
+
ERROR_FAILED_EVALUATE = 50
|
185
|
+
ERROR_FAILED_EXEC = 46
|
186
|
+
ERROR_FAILED_LOAD_LIBRARY = 47
|
187
|
+
ERROR_FUNCTION_DISPOSED = 49
|
188
|
+
ERROR_GRAPHIC_DISPOSED = 44
|
189
|
+
ERROR_INVALID_ARGUMENT = 5
|
190
|
+
ERROR_INVALID_FONT = 48
|
191
|
+
ERROR_INVALID_IMAGE = 40
|
192
|
+
ERROR_INVALID_PARENT = 32
|
193
|
+
ERROR_INVALID_RANGE = 6
|
194
|
+
ERROR_INVALID_RETURN_VALUE = 51
|
195
|
+
ERROR_INVALID_SUBCLASS = 43
|
196
|
+
ERROR_IO = 39
|
197
|
+
ERROR_ITEM_NOT_ADDED = 14
|
198
|
+
ERROR_ITEM_NOT_REMOVED = 15
|
199
|
+
ERROR_MENUITEM_NOT_CASCADE = 27
|
200
|
+
ERROR_MENU_NOT_BAR = 33
|
201
|
+
ERROR_MENU_NOT_DROP_DOWN = 21
|
202
|
+
ERROR_MENU_NOT_POP_UP = 37
|
203
|
+
ERROR_NOT_IMPLEMENTED = 20
|
204
|
+
ERROR_NO_GRAPHICS_LIBRARY = 16
|
205
|
+
ERROR_NO_HANDLES = 2
|
206
|
+
ERROR_NO_MORE_CALLBACKS = 3
|
207
|
+
ERROR_NULL_ARGUMENT = 4
|
208
|
+
ERROR_THREAD_INVALID_ACCESS = 22
|
209
|
+
ERROR_UNSPECIFIED = 1
|
210
|
+
ERROR_UNSUPPORTED_DEPTH = 38
|
211
|
+
ERROR_UNSUPPORTED_FORMAT = 42
|
212
|
+
ERROR_WIDGET_DISPOSED = 24
|
213
|
+
ESC = 27
|
214
|
+
EraseItem = 40
|
215
|
+
Expand = 17
|
216
|
+
F1 = 16777226
|
217
|
+
F10 = 16777235
|
218
|
+
F11 = 16777236
|
219
|
+
F12 = 16777237
|
220
|
+
F13 = 16777238
|
221
|
+
F14 = 16777239
|
222
|
+
F15 = 16777240
|
223
|
+
F16 = 16777241
|
224
|
+
F17 = 16777242
|
225
|
+
F18 = 16777243
|
226
|
+
F19 = 16777244
|
227
|
+
F2 = 16777227
|
228
|
+
F20 = 16777245
|
229
|
+
F3 = 16777228
|
230
|
+
F4 = 16777229
|
231
|
+
F5 = 16777230
|
232
|
+
F6 = 16777231
|
233
|
+
F7 = 16777232
|
234
|
+
F8 = 16777233
|
235
|
+
F9 = 16777234
|
236
|
+
FILL = 4
|
237
|
+
FILL_EVEN_ODD = 1
|
238
|
+
FILL_WINDING = 2
|
239
|
+
FLAT = 8388608
|
240
|
+
FLIP_TEXT_DIRECTION = -2147483648
|
241
|
+
FOCUSED = 4
|
242
|
+
FOREGROUND = 16
|
243
|
+
FULL_SELECTION = 65536
|
244
|
+
FocusIn = 15
|
245
|
+
FocusOut = 16
|
246
|
+
GESTURE_BEGIN = 2
|
247
|
+
GESTURE_END = 4
|
248
|
+
GESTURE_MAGNIFY = 32
|
249
|
+
GESTURE_PAN = 64
|
250
|
+
GESTURE_ROTATE = 8
|
251
|
+
GESTURE_SWIPE = 16
|
252
|
+
Gesture = 48
|
253
|
+
HELP = 16777297
|
254
|
+
HIDE_SELECTION = 32768
|
255
|
+
HIGH = 2
|
256
|
+
HOME = 16777223
|
257
|
+
HORIZONTAL = 256
|
258
|
+
HOT = 32
|
259
|
+
H_SCROLL = 256
|
260
|
+
HardKeyDown = 33
|
261
|
+
HardKeyUp = 34
|
262
|
+
Help = 28
|
263
|
+
Hide = 23
|
264
|
+
ICON = 1
|
265
|
+
ICON_CANCEL = 256
|
266
|
+
ICON_ERROR = 1
|
267
|
+
ICON_INFORMATION = 2
|
268
|
+
ICON_QUESTION = 4
|
269
|
+
ICON_SEARCH = 512
|
270
|
+
ICON_WARNING = 8
|
271
|
+
ICON_WORKING = 16
|
272
|
+
ID_ABOUT = -1
|
273
|
+
ID_HIDE = -3
|
274
|
+
ID_HIDE_OTHERS = -4
|
275
|
+
ID_PREFERENCES = -2
|
276
|
+
ID_QUIT = -6
|
277
|
+
ID_SHOW_ALL = -5
|
278
|
+
IGNORE = 2048
|
279
|
+
IMAGE_BMP = 0
|
280
|
+
IMAGE_BMP_RLE = 1
|
281
|
+
IMAGE_COPY = 0
|
282
|
+
IMAGE_DISABLE = 1
|
283
|
+
IMAGE_GIF = 2
|
284
|
+
IMAGE_GRAY = 2
|
285
|
+
IMAGE_ICO = 3
|
286
|
+
IMAGE_JPEG = 4
|
287
|
+
IMAGE_OS2_BMP = 7
|
288
|
+
IMAGE_PNG = 5
|
289
|
+
IMAGE_SVG = 8
|
290
|
+
IMAGE_TIFF = 6
|
291
|
+
IMAGE_UNDEFINED = -1
|
292
|
+
INDETERMINATE = 2
|
293
|
+
INHERIT_DEFAULT = 1
|
294
|
+
INHERIT_FORCE = 2
|
295
|
+
INHERIT_NONE = 0
|
296
|
+
INSERT = 16777225
|
297
|
+
ITALIC = 2
|
298
|
+
Iconify = 19
|
299
|
+
ImeComposition = 43
|
300
|
+
JOIN_BEVEL = 3
|
301
|
+
JOIN_MITER = 1
|
302
|
+
JOIN_ROUND = 2
|
303
|
+
KEYCODE_BIT = 16777216
|
304
|
+
KEYPAD = 2
|
305
|
+
KEYPAD_0 = 16777264
|
306
|
+
KEYPAD_1 = 16777265
|
307
|
+
KEYPAD_2 = 16777266
|
308
|
+
KEYPAD_3 = 16777267
|
309
|
+
KEYPAD_4 = 16777268
|
310
|
+
KEYPAD_5 = 16777269
|
311
|
+
KEYPAD_6 = 16777270
|
312
|
+
KEYPAD_7 = 16777271
|
313
|
+
KEYPAD_8 = 16777272
|
314
|
+
KEYPAD_9 = 16777273
|
315
|
+
KEYPAD_ADD = 16777259
|
316
|
+
KEYPAD_CR = 16777296
|
317
|
+
KEYPAD_DECIMAL = 16777262
|
318
|
+
KEYPAD_DIVIDE = 16777263
|
319
|
+
KEYPAD_EQUAL = 16777277
|
320
|
+
KEYPAD_MULTIPLY = 16777258
|
321
|
+
KEYPAD_SUBTRACT = 16777261
|
322
|
+
KEY_MASK = 16842751
|
323
|
+
KeyDown = 1
|
324
|
+
KeyUp = 2
|
325
|
+
LAST_LINE_SELECTION = 1048576
|
326
|
+
LEAD = 16384
|
327
|
+
LEFT = 16384
|
328
|
+
LEFT_TO_RIGHT = 33554432
|
329
|
+
LF = 10
|
330
|
+
LINE_CUSTOM = 6
|
331
|
+
LINE_DASH = 2
|
332
|
+
LINE_DASHDOT = 4
|
333
|
+
LINE_DASHDOTDOT = 5
|
334
|
+
LINE_DOT = 3
|
335
|
+
LINE_SOLID = 1
|
336
|
+
LONG = 268435456
|
337
|
+
LOW = 1
|
338
|
+
MAX = 1024
|
339
|
+
MEDIUM = 65536
|
340
|
+
MENU = 64
|
341
|
+
MENU_KEYBOARD = 1
|
342
|
+
MENU_MOUSE = 0
|
343
|
+
MIN = 128
|
344
|
+
MIRRORED = 134217728
|
345
|
+
MOD1 = 4194304
|
346
|
+
MOD2 = 131072
|
347
|
+
MOD3 = 65536
|
348
|
+
MOD4 = 262144
|
349
|
+
MODELESS = 0
|
350
|
+
MODIFIER_MASK = 4685824
|
351
|
+
MOVEMENT_CHAR = 1
|
352
|
+
MOVEMENT_CLUSTER = 2
|
353
|
+
MOVEMENT_WORD = 4
|
354
|
+
MOVEMENT_WORD_END = 8
|
355
|
+
MOVEMENT_WORD_START = 16
|
356
|
+
MOZILLA = 32768
|
357
|
+
MULTI = 2
|
358
|
+
MeasureItem = 41
|
359
|
+
MenuDetect = 35
|
360
|
+
Modify = 24
|
361
|
+
MouseDoubleClick = 8
|
362
|
+
MouseDown = 3
|
363
|
+
MouseEnter = 6
|
364
|
+
MouseExit = 7
|
365
|
+
MouseHorizontalWheel = 38
|
366
|
+
MouseHover = 32
|
367
|
+
MouseMove = 5
|
368
|
+
MouseUp = 4
|
369
|
+
MouseVerticalWheel = 37
|
370
|
+
MouseWheel = 37
|
371
|
+
Move = 10
|
372
|
+
NATIVE = 8
|
373
|
+
NO = 128
|
374
|
+
NONE = 0
|
375
|
+
NORMAL = 0
|
376
|
+
NO_BACKGROUND = 262144
|
377
|
+
NO_FOCUS = 524288
|
378
|
+
NO_MERGE_PAINTS = 2097152
|
379
|
+
NO_MOVE = 8388608
|
380
|
+
NO_RADIO_GROUP = 4194304
|
381
|
+
NO_REDRAW_RESIZE = 1048576
|
382
|
+
NO_SCROLL = 16
|
383
|
+
NO_TRIM = 8
|
384
|
+
NULL = 0
|
385
|
+
NUM_LOCK = 16777299
|
386
|
+
None = 0
|
387
|
+
OFF = 0
|
388
|
+
OK = 32
|
389
|
+
ON = 1
|
390
|
+
ON_TOP = 16384
|
391
|
+
OPEN = 4096
|
392
|
+
OpenDocument = 46
|
393
|
+
OpenUrl = 54
|
394
|
+
OrientationChange = 44
|
395
|
+
PAGE_DOWN = 16777222
|
396
|
+
PAGE_UP = 16777221
|
397
|
+
PASSWORD = 4194304
|
398
|
+
PATH_CLOSE = 5
|
399
|
+
PATH_CUBIC_TO = 4
|
400
|
+
PATH_LINE_TO = 2
|
401
|
+
PATH_MOVE_TO = 1
|
402
|
+
PATH_QUAD_TO = 3
|
403
|
+
PAUSE = 16777301
|
404
|
+
PAUSED = 4
|
405
|
+
PHONETIC = 16
|
406
|
+
POP_UP = 8
|
407
|
+
PRIMARY_MODAL = 32768
|
408
|
+
PRINT_SCREEN = 16777303
|
409
|
+
PUSH = 8
|
410
|
+
Paint = 9
|
411
|
+
PaintItem = 42
|
412
|
+
PostEvent = 51
|
413
|
+
PostExternalEventDispatch = 53
|
414
|
+
PreEvent = 50
|
415
|
+
PreExternalEventDispatch = 52
|
416
|
+
RADIO = 16
|
417
|
+
READ_ONLY = 8
|
418
|
+
RESIZE = 16
|
419
|
+
RETRY = 1024
|
420
|
+
RIGHT = 131072
|
421
|
+
RIGHT_TO_LEFT = 67108864
|
422
|
+
ROMAN = 32
|
423
|
+
Resize = 11
|
424
|
+
SAVE = 8192
|
425
|
+
SCROLLBAR_OVERLAY = 2
|
426
|
+
SCROLL_LINE = 1
|
427
|
+
SCROLL_LOCK = 16777300
|
428
|
+
SCROLL_PAGE = 2
|
429
|
+
SEARCH = 128
|
430
|
+
SELECTED = 2
|
431
|
+
SEPARATOR = 2
|
432
|
+
SEPARATOR_FILL = -2
|
433
|
+
SHADOW_ETCHED_IN = 16
|
434
|
+
SHADOW_ETCHED_OUT = 64
|
435
|
+
SHADOW_IN = 4
|
436
|
+
SHADOW_NONE = 32
|
437
|
+
SHADOW_OUT = 8
|
438
|
+
SHEET = 268435456
|
439
|
+
SHELL_TRIM = 1264
|
440
|
+
SHIFT = 131072
|
441
|
+
SHORT = 32768
|
442
|
+
SIMPLE = 64
|
443
|
+
SINGLE = 4
|
444
|
+
SKIN_CLASS = 'org.eclipse.swt.skin.class'
|
445
|
+
SKIN_ID = 'org.eclipse.swt.skin.id'
|
446
|
+
SMOOTH = 65536
|
447
|
+
SPACE = 32
|
448
|
+
SYSTEM_MODAL = 131072
|
449
|
+
Segments = 49
|
450
|
+
Selection = 13
|
451
|
+
SetData = 36
|
452
|
+
Settings = 39
|
453
|
+
Show = 22
|
454
|
+
Skin = 45
|
455
|
+
Sleep = 52
|
456
|
+
TAB = 9
|
457
|
+
TIME = 128
|
458
|
+
TITLE = 32
|
459
|
+
TOGGLE = 2
|
460
|
+
TOOL = 4
|
461
|
+
TOP = 128
|
462
|
+
TOUCHSTATE_DOWN = 1
|
463
|
+
TOUCHSTATE_MOVE = 2
|
464
|
+
TOUCHSTATE_UP = 4
|
465
|
+
TRAIL = 131072
|
466
|
+
TRANSPARENCY_ALPHA = 1
|
467
|
+
TRANSPARENCY_MASK = 2
|
468
|
+
TRANSPARENCY_NONE = 0
|
469
|
+
TRANSPARENCY_PIXEL = 4
|
470
|
+
TRANSPARENT = 1073741824
|
471
|
+
TRAVERSE_ARROW_NEXT = 64
|
472
|
+
TRAVERSE_ARROW_PREVIOUS = 32
|
473
|
+
TRAVERSE_ESCAPE = 2
|
474
|
+
TRAVERSE_MNEMONIC = 128
|
475
|
+
TRAVERSE_NONE = 0
|
476
|
+
TRAVERSE_PAGE_NEXT = 512
|
477
|
+
TRAVERSE_PAGE_PREVIOUS = 256
|
478
|
+
TRAVERSE_RETURN = 4
|
479
|
+
TRAVERSE_TAB_NEXT = 16
|
480
|
+
TRAVERSE_TAB_PREVIOUS = 8
|
481
|
+
Touch = 47
|
482
|
+
Traverse = 31
|
483
|
+
UNDERLINE_DOUBLE = 1
|
484
|
+
UNDERLINE_ERROR = 2
|
485
|
+
UNDERLINE_LINK = 4
|
486
|
+
UNDERLINE_SINGLE = 0
|
487
|
+
UNDERLINE_SQUIGGLE = 3
|
488
|
+
UP = 128
|
489
|
+
VERTICAL = 512
|
490
|
+
VIRTUAL = 268435456
|
491
|
+
V_SCROLL = 512
|
492
|
+
Verify = 25
|
493
|
+
WEBKIT = 65536
|
494
|
+
WRAP = 64
|
495
|
+
Wakeup = 53
|
496
|
+
YES = 64
|
497
|
+
ZoomChanged = 55
|
498
|
+
end
|
499
|
+
end
|