diff --git a/docs/G100-G200.txt b/docs/G100-G200.txt
index dfae776..a7fbae0 100644
--- a/docs/G100-G200.txt
+++ b/docs/G100-G200.txt
@@ -4,10 +4,10 @@
"option_count": 65
},
"restore": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "none",
"visible": true,
"field": "Common",
"pos": 0,
@@ -20,10 +20,10 @@
"size": 0
},
"help": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "none",
"visible": true,
"field": "Common",
"pos": 0,
@@ -36,22 +36,22 @@
"size": 4
},
"grp-1": {
- "category": "base",
+ "cat": "base",
"title": "基本设置",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-multiout": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -64,10 +64,10 @@
"size": 4
},
"multiout-type": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -82,10 +82,10 @@
"depend_or": ["is-multiout==true"]
},
"mode": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -100,10 +100,10 @@
"depend_or": ["is-multiout!=true"]
},
"binary-threshold": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -119,13 +119,13 @@
"max": 255,
"step": 1
},
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"reverse-bw": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -136,13 +136,13 @@
"cur": false,
"default": false,
"size": 4,
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"filter": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -157,10 +157,10 @@
"depend_and": ["is-multiout!=true", "mode!=24位彩色", "!=颜色自动识别"]
},
"is-rid-multiout-red": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -174,10 +174,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-rid-answer-sheet-red": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -191,10 +191,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-erase-bkg": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -208,10 +208,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"bkg-color-range": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -230,10 +230,10 @@
"depend_or": ["is-erase-bkg==true"]
},
"sharpen": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -248,10 +248,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-morr": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -265,10 +265,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-grid": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -282,10 +282,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-err-extension": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -299,10 +299,10 @@
"depend_or": ["mode==黑白"]
},
"is-noise-optimize": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -316,10 +316,10 @@
"depend_or": ["mode==黑白"]
},
"noise-size": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -338,10 +338,10 @@
"depend_or": ["is-noise-optimize==true"]
},
"paper": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -355,10 +355,10 @@
"range": ["A3", "8开", "A4", "A4横向", "16开", "16开横向", "A5", "A5横向", "A6", "A6横向", "B4", "B5", "B5横向", "B6", "B6横向", "Letter", "Letter横向", "Double Letter", "LEGAL", "匹配原始尺寸", "最大扫描尺寸自动裁切", "最大扫描尺寸", "三联试卷"]
},
"is-custom-area": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -372,10 +372,10 @@
"depend_and": ["paper!=匹配原始尺寸", "!=三联试卷", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切"]
},
"tl-x": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -394,10 +394,10 @@
"depend_and": ["is-custom-area==true"]
},
"br-x": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -416,10 +416,10 @@
"depend_and": ["is-custom-area==true"]
},
"tl-y": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -438,10 +438,10 @@
"depend_and": ["is-custom-area==true"]
},
"br-y": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -460,10 +460,10 @@
"depend_and": ["is-custom-area==true"]
},
"page": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -477,10 +477,10 @@
"range": ["单面", "双面", "跳过空白页(通用)", "跳过空白页(发票纸)", "对折"]
},
"blank-sensitivity": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -499,10 +499,10 @@
"depend_or": ["page==跳过空白页(通用)", "==跳过空白页(发票纸)"]
},
"fold-type": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -517,10 +517,10 @@
"depend_or": ["page==对折"]
},
"resolution": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -538,10 +538,10 @@
}
},
"is-exchange": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -555,22 +555,22 @@
"depend_and": ["page!=单面"]
},
"grp-2": {
- "category": "base",
+ "cat": "base",
"title": "亮度",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-custom-gamma": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -583,10 +583,10 @@
"size": 4
},
"brightness": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -605,10 +605,10 @@
"depend_and": ["is-custom-gamma==false"]
},
"contrast": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -627,10 +627,10 @@
"depend_and": ["is-custom-gamma==false"]
},
"gamma": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -649,22 +649,22 @@
"depend_and": ["is-custom-gamma==false"]
},
"grp-3": {
- "category": "base",
+ "cat": "base",
"title": "图像处理",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-anti-skew": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -678,10 +678,10 @@
"depend_or": ["page!=对折"]
},
"is-split": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -695,10 +695,10 @@
"depend_or": ["page!=对折"]
},
"is-erase-black-frame": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -711,10 +711,10 @@
"size": 4
},
"bkg-fill-mode": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -729,10 +729,10 @@
"depend_or": ["is-erase-black-frame==true"]
},
"is-fill-color": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -746,10 +746,10 @@
"depend_and": ["is-erase-black-frame==true"]
},
"threshold": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -768,10 +768,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"anti-noise-level": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -790,10 +790,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"margin": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -812,10 +812,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸自动裁切", "==最大扫描尺寸", "is-anti-skew==true"]
},
"is-dark-sample": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -829,10 +829,10 @@
"depend_and": ["page!=对折", "is-erase-black-frame!=true", "paper!=匹配原始尺寸", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切", "is-anti-skew!=true"]
},
"is-anti-permeate": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -845,10 +845,10 @@
"size": 4
},
"permeate-level": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -863,10 +863,10 @@
"depend_or": ["is-anti-permeate==true"]
},
"is-rid-hole-l": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -879,10 +879,10 @@
"size": 4
},
"search-hole-range-l": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -901,10 +901,10 @@
"depend_or": ["is-rid-hole-l==true"]
},
"is-rid-hole-r": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -917,10 +917,10 @@
"size": 4
},
"search-hole-range-r": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -939,10 +939,10 @@
"depend_or": ["is-rid-hole-r==true"]
},
"is-rid-hole-t": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -955,10 +955,10 @@
"size": 4
},
"search-hole-range-t": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -977,10 +977,10 @@
"depend_or": ["is-rid-hole-t==true"]
},
"is-rid-hole-b": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -993,10 +993,10 @@
"size": 4
},
"search-hole-range-b": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1015,22 +1015,22 @@
"depend_or": ["is-rid-hole-b==true"]
},
"grp-4": {
- "category": "base",
+ "cat": "base",
"title": "送纸方式设置",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"scan-mode": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1044,10 +1044,10 @@
"range": ["连续扫描", "扫描指定张数"]
},
"scan-count": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1061,10 +1061,10 @@
"depend_or": ["scan-mode==扫描指定张数"]
},
"direction": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1078,10 +1078,10 @@
"range": ["0°", "90°", "180°", "-90°", "自动文本方向识别°"]
},
"is-rotate-bkg-180": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1095,10 +1095,10 @@
"depend_and": ["page!=单面", "!=对折", "direction!=自动文本方向识别°"]
},
"is-ultrosonic": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1111,10 +1111,10 @@
"size": 4
},
"is-staple": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1127,10 +1127,10 @@
"size": 4
},
"is-check-askew": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1143,10 +1143,10 @@
"size": 4
},
"askew-range": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
diff --git a/docs/G139-239.txt b/docs/G139-239.txt
index 517e6da..245d7b4 100644
--- a/docs/G139-239.txt
+++ b/docs/G139-239.txt
@@ -4,10 +4,10 @@
"option_count": 77
},
"restore": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "none",
"visible": true,
"field": "Common",
"pos": 0,
@@ -20,10 +20,10 @@
"size": 0
},
"help": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "none",
"visible": true,
"field": "Common",
"pos": 0,
@@ -36,22 +36,22 @@
"size": 4
},
"grp-1": {
- "category": "base",
+ "cat": "base",
"title": "基本设置",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-multiout": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -64,10 +64,10 @@
"size": 4
},
"multiout-type": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -82,10 +82,10 @@
"depend_or": ["is-multiout==true"]
},
"mode": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -100,10 +100,10 @@
"depend_or": ["is-multiout!=true"]
},
"binary-threshold": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -119,13 +119,13 @@
"max": 255,
"step": 1
},
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"reverse-bw": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -136,13 +136,13 @@
"cur": false,
"default": false,
"size": 4,
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"filter": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -157,10 +157,10 @@
"depend_and": ["is-multiout!=true", "mode!=24位彩色", "!=颜色自动识别"]
},
"is-rid-multiout-red": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -174,10 +174,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-rid-answer-sheet-red": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -191,10 +191,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-erase-bkg": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -208,10 +208,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"bkg-color-range": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -230,10 +230,10 @@
"depend_or": ["is-erase-bkg==true"]
},
"sharpen": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -248,10 +248,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-morr": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -265,10 +265,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-grid": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -282,10 +282,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-err-extension": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -299,10 +299,10 @@
"depend_or": ["mode==黑白"]
},
"is-noise-optimize": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -316,10 +316,10 @@
"depend_or": ["mode==黑白"]
},
"noise-size": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -338,10 +338,10 @@
"depend_or": ["is-noise-optimize==true"]
},
"paper": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -355,10 +355,10 @@
"range": ["A3", "8开", "A4", "A4横向", "16开", "16开横向", "A5", "A5横向", "A6", "A6横向", "B4", "B5", "B5横向", "B6", "B6横向", "Letter", "Letter横向", "Double Letter", "LEGAL", "匹配原始尺寸", "最大扫描尺寸自动裁切", "最大扫描尺寸", "三联试卷"]
},
"is-custom-area": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -372,10 +372,10 @@
"depend_and": ["paper!=匹配原始尺寸", "!=三联试卷", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切"]
},
"tl-x": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -394,10 +394,10 @@
"depend_and": ["is-custom-area==true"]
},
"br-x": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -416,10 +416,10 @@
"depend_and": ["is-custom-area==true"]
},
"tl-y": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -438,10 +438,10 @@
"depend_and": ["is-custom-area==true"]
},
"br-y": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -460,10 +460,10 @@
"depend_and": ["is-custom-area==true"]
},
"is-size-check": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -477,10 +477,10 @@
"depend_or": ["paper==A3", "==A4", "==A4横向", "==A5", "==A5横向", "==A6", "==A6横向", "==B4", "==B5", "==B5横向", "==B6", "==B6横向", "==Double Letter", "==LEGAL", "==Letter", "==Letter横向"]
},
"page": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -494,10 +494,10 @@
"range": ["单面", "双面", "跳过空白页(通用)", "跳过空白页(发票纸)", "对折"]
},
"blank-sensitivity": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -516,10 +516,10 @@
"depend_or": ["page==跳过空白页(通用)", "==跳过空白页(发票纸)"]
},
"fold-type": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -534,10 +534,10 @@
"depend_or": ["page==对折"]
},
"resolution": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -555,10 +555,10 @@
}
},
"image-quality": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -573,10 +573,10 @@
"depend_or": ["resolution>=300"]
},
"is-exchange": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -590,22 +590,22 @@
"depend_and": ["page!=单面"]
},
"grp-2": {
- "category": "base",
+ "cat": "base",
"title": "亮度",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-custom-gamma": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -618,10 +618,10 @@
"size": 4
},
"brightness": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -640,10 +640,10 @@
"depend_and": ["is-custom-gamma==false"]
},
"contrast": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -662,10 +662,10 @@
"depend_and": ["is-custom-gamma==false"]
},
"gamma": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -684,22 +684,22 @@
"depend_and": ["is-custom-gamma==false"]
},
"grp-3": {
- "category": "base",
+ "cat": "base",
"title": "图像处理",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"color-correction": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -712,10 +712,10 @@
"size": 4
},
"is-anti-skew": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -729,10 +729,10 @@
"depend_or": ["page!=对折"]
},
"is-split": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -746,10 +746,10 @@
"depend_and": ["page!=对折", "!=跳过空白页(发票纸)", "!=跳过空白页(通用)"]
},
"is-erase-black-frame": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -762,10 +762,10 @@
"size": 4
},
"bkg-fill-mode": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -780,10 +780,10 @@
"depend_or": ["is-erase-black-frame==true"]
},
"is-fill-color": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -797,10 +797,10 @@
"depend_and": ["is-erase-black-frame==true"]
},
"threshold": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -819,10 +819,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"anti-noise-level": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -841,10 +841,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"margin": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -863,10 +863,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸自动裁切", "==最大扫描尺寸", "is-anti-skew==true"]
},
"is-dark-sample": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -880,10 +880,10 @@
"depend_and": ["page!=对折", "is-erase-black-frame!=true", "paper!=匹配原始尺寸", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切", "is-anti-skew!=true"]
},
"is-anti-permeate": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -896,10 +896,10 @@
"size": 4
},
"permeate-level": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -914,10 +914,10 @@
"depend_or": ["is-anti-permeate==true"]
},
"is-rid-hole-l": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -930,10 +930,10 @@
"size": 4
},
"search-hole-range-l": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -952,10 +952,10 @@
"depend_and": ["is-rid-hole-l==true"]
},
"is-rid-hole-r": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -968,10 +968,10 @@
"size": 4
},
"search-hole-range-r": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -990,10 +990,10 @@
"depend_and": ["is-rid-hole-r==true"]
},
"is-rid-hole-t": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1006,10 +1006,10 @@
"size": 4
},
"search-hole-range-t": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1028,10 +1028,10 @@
"depend_and": ["is-rid-hole-t==true"]
},
"is-rid-hole-b": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1044,10 +1044,10 @@
"size": 4
},
"search-hole-range-b": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1066,22 +1066,22 @@
"depend_and": ["is-rid-hole-b==true"]
},
"grp-4": {
- "category": "base",
+ "cat": "base",
"title": "送纸方式设置",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-wait-scan": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1094,10 +1094,10 @@
"size": 4
},
"wait-scan-exit": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1112,10 +1112,10 @@
"depend_or": ["is-wait-scan==true"]
},
"scan-mode": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1130,10 +1130,10 @@
"depend_or": ["is-wait-scan==false"]
},
"scan-count": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1147,10 +1147,10 @@
"depend_or": ["scan-mode==扫描指定张数"]
},
"direction": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1164,10 +1164,10 @@
"range": ["0°", "90°", "180°", "-90°", "自动文本方向识别°"]
},
"is-rotate-bkg-180": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1181,10 +1181,10 @@
"depend_and": ["page!=单面", "!=对折", "direction!=自动文本方向识别°"]
},
"is-ultrosonic": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1197,10 +1197,10 @@
"size": 4
},
"double-feed": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1215,10 +1215,10 @@
"depend_or": ["is-ultrosonic==true"]
},
"is-staple": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1231,10 +1231,10 @@
"size": 4
},
"is-check-askew": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1247,10 +1247,10 @@
"size": 4
},
"askew-range": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1269,10 +1269,10 @@
"depend_or": ["is-check-askew==true"]
},
"is-check-dog-ear": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1285,10 +1285,10 @@
"size": 4
},
"dog-ear-size": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1307,10 +1307,10 @@
"depend_or": ["is-check-dog-ear==true"]
},
"is-auto-strength": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1323,10 +1323,10 @@
"size": 4
},
"feed-strength-value": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1345,10 +1345,10 @@
"depend_or": ["is-auto-strength==true"]
},
"feed-strength": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1363,10 +1363,10 @@
"depend_or": ["is-auto-strength!=true"]
},
"time-to-sleep": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
diff --git a/docs/G300.txt b/docs/G300.txt
index 338a339..ee95705 100644
--- a/docs/G300.txt
+++ b/docs/G300.txt
@@ -4,10 +4,10 @@
"option_count": 64
},
"restore": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "none",
"visible": true,
"field": "Common",
"pos": 0,
@@ -20,10 +20,10 @@
"size": 0
},
"help": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "none",
"visible": true,
"field": "Common",
"pos": 0,
@@ -36,22 +36,22 @@
"size": 4
},
"grp-1": {
- "category": "base",
+ "cat": "base",
"title": "基本设置",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-multiout": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -64,10 +64,10 @@
"size": 4
},
"multiout-type": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -82,10 +82,10 @@
"depend_or": ["is-multiout==true"]
},
"mode": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -100,10 +100,10 @@
"depend_or": ["is-multiout==false"]
},
"binary-threshold": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -119,13 +119,13 @@
"max": 255,
"step": 1
},
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"reverse-bw": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -136,13 +136,13 @@
"cur": false,
"default": false,
"size": 4,
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"filter": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -157,10 +157,10 @@
"depend_and": ["is-multiout!=true", "mode!=24位彩色", "!=颜色自动识别"]
},
"is-rid-multiout-red": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -174,10 +174,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-rid-answer-sheet-red": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -191,10 +191,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-erase-bkg": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -208,10 +208,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"bkg-color-range": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -230,10 +230,10 @@
"depend_or": ["is-erase-bkg==true"]
},
"sharpen": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -248,10 +248,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-morr": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -265,10 +265,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-grid": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -282,10 +282,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-err-extension": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -299,10 +299,10 @@
"depend_or": ["mode==黑白"]
},
"is-noise-optimize": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -316,10 +316,10 @@
"depend_or": ["mode==黑白"]
},
"noise-size": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -338,10 +338,10 @@
"depend_or": ["is-noise-optimize==true"]
},
"paper": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -355,10 +355,10 @@
"range": ["A4", "A5", "A5横向", "A6", "A6横向", "B5", "B6", "B6横向", "匹配原始尺寸", "最大扫描尺寸自动裁切", "最大扫描尺寸"]
},
"is-custom-area": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -372,10 +372,10 @@
"depend_and": ["paper!=匹配原始尺寸", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切"]
},
"tl-x": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -394,10 +394,10 @@
"depend_and": ["is-custom-area==true"]
},
"br-x": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -416,10 +416,10 @@
"depend_and": ["is-custom-area==true"]
},
"tl-y": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -438,10 +438,10 @@
"depend_and": ["is-custom-area==true"]
},
"br-y": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -460,10 +460,10 @@
"depend_and": ["is-custom-area==true"]
},
"is-size-check": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -477,10 +477,10 @@
"depend_and": ["paper!=匹配原始尺寸", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切"]
},
"page": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -494,10 +494,10 @@
"range": ["单面", "双面", "跳过空白页(通用)", "跳过空白页(发票纸)", "对折"]
},
"blank-sensitivity": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -516,10 +516,10 @@
"depend_or": ["page==跳过空白页(通用)", "==跳过空白页(发票纸)"]
},
"fold-type": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -534,10 +534,10 @@
"depend_or": ["page==对折"]
},
"resolution": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -555,10 +555,10 @@
}
},
"image-quality": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -573,10 +573,10 @@
"depend_or": ["resolution>=300"]
},
"is-exchange": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -590,22 +590,22 @@
"depend_and": ["page!=单面"]
},
"grp-2": {
- "category": "base",
+ "cat": "base",
"title": "亮度",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-custom-gamma": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -618,10 +618,10 @@
"size": 4
},
"brightness": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -640,10 +640,10 @@
"depend_and": ["is-custom-gamma==false"]
},
"contrast": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -662,10 +662,10 @@
"depend_and": ["is-custom-gamma==false"]
},
"gamma": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -684,22 +684,22 @@
"depend_and": ["is-custom-gamma==false"]
},
"grp-3": {
- "category": "base",
+ "cat": "base",
"title": "图像处理",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-anti-skew": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -713,10 +713,10 @@
"depend_or": ["page!=对折"]
},
"is-split": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -730,10 +730,10 @@
"depend_or": ["page!=对折"]
},
"is-erase-black-frame": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -746,10 +746,10 @@
"size": 4
},
"bkg-fill-mode": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -764,10 +764,10 @@
"depend_or": ["is-erase-black-frame==true"]
},
"is-fill-color": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -781,10 +781,10 @@
"depend_and": ["is-erase-black-frame==true"]
},
"threshold": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -803,10 +803,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"anti-noise-level": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -825,10 +825,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"margin": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -847,10 +847,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸自动裁切", "==最大扫描尺寸", "is-anti-skew==true"]
},
"is-dark-sample": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -864,10 +864,10 @@
"depend_and": ["page!=对折", "is-erase-black-frame!=true", "paper!=匹配原始尺寸", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切", "is-anti-skew!=true"]
},
"is-anti-permeate": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -880,10 +880,10 @@
"size": 4
},
"permeate-level": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -898,10 +898,10 @@
"depend_or": ["is-anti-permeate==true"]
},
"is-rid-hole-l": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -914,10 +914,10 @@
"size": 4
},
"search-hole-range-l": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -936,10 +936,10 @@
"depend_or": ["is-rid-hole-l==true"]
},
"is-rid-hole-r": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -952,10 +952,10 @@
"size": 4
},
"search-hole-range-r": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -974,10 +974,10 @@
"depend_or": ["is-rid-hole-r==true"]
},
"is-rid-hole-t": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -990,10 +990,10 @@
"size": 4
},
"search-hole-range-t": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1012,10 +1012,10 @@
"depend_or": ["is-rid-hole-t==true"]
},
"is-rid-hole-b": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1028,10 +1028,10 @@
"size": 4
},
"search-hole-range-b": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1050,22 +1050,22 @@
"depend_or": ["is-rid-hole-b==true"]
},
"grp-4": {
- "category": "base",
+ "cat": "base",
"title": "送纸方式设置",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"scan-mode": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1079,10 +1079,10 @@
"range": ["连续扫描", "扫描指定张数"]
},
"scan-count": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1096,10 +1096,10 @@
"depend_or": ["scan-mode==扫描指定张数"]
},
"direction": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1113,10 +1113,10 @@
"range": ["0°", "90°", "180°", "-90°", "自动文本方向识别°"]
},
"is-rotate-bkg-180": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1130,10 +1130,10 @@
"depend_and": ["page!=单面", "!=对折", "direction!=自动文本方向识别°"]
},
"is-ultrosonic": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
diff --git a/docs/G302.txt b/docs/G302.txt
index 6501088..59d16da 100644
--- a/docs/G302.txt
+++ b/docs/G302.txt
@@ -4,7 +4,14 @@
"option_count": 62
},
"restore": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "none",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "恢复默认设置",
"desc": "恢复默认设置",
"type": "button",
@@ -13,7 +20,14 @@
"size": 0
},
"help": {
- "category": "advanced",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "none",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "帮助",
"desc": "显示软件帮助文档",
"type": "button",
@@ -22,12 +36,26 @@
"size": 4
},
"grp-1": {
- "category": "base",
+ "cat": "base",
"title": "基本设置",
- "type": "group"
+ "type": "group",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "field": "Common",
+ "pos": 0,
+ "visible": true,
+ "unit": "None"
},
"is-multiout": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "多流输出",
"desc": "同时输出多种颜色模式的图像",
"type": "bool",
@@ -36,7 +64,14 @@
"size": 4
},
"multiout-type": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "多流输出类型",
"desc": "选择多流输出的类型",
"type": "string",
@@ -47,7 +82,14 @@
"depend_or": ["is-multiout==true"]
},
"mode": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "颜色模式",
"desc": "选择色彩模式",
"type": "string",
@@ -58,7 +100,14 @@
"depend_or": ["is-multiout==false"]
},
"binary-threshold": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "黑白图像阈值",
"desc": "高于该阈值为1(白),低于该阈值为0(黑)",
"type": "int",
@@ -67,22 +116,37 @@
"size": 4,
"range": {
"min": 0,
- "max": 255
+ "max": 255,
+ "step": 1
},
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"reverse-bw": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "黑白图像反色输出",
"desc": "输出的黑白图像以“1”代表黑色,“0”代表白色",
"type": "bool",
"cur": false,
"default": false,
"size": 4,
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"filter": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "灰度或黑白图像 - 除色与增强",
"desc": "消除或增强指定色彩",
"type": "string",
@@ -93,7 +157,14 @@
"depend_and": ["is-multiout!=true", "mode!=24位彩色", "!=颜色自动识别"]
},
"is-rid-multiout-red": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "24位彩色图像 - 多流输出除红",
"desc": "同时输出彩色图像和灰度除红图像",
"type": "bool",
@@ -103,7 +174,14 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-rid-answer-sheet-red": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "24位彩色图像 - 答题卡除红",
"desc": "输出除红彩色图像",
"type": "bool",
@@ -113,7 +191,14 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-erase-bkg": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "背景移除",
"desc": "移除文稿背景底色",
"type": "bool",
@@ -123,7 +208,14 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"bkg-color-range": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 背景色彩浮动范围",
"desc": "与背景底色偏差在该值范围内的颜色,都将被移除",
"type": "int",
@@ -132,12 +224,20 @@
"size": 4,
"range": {
"min": 1,
- "max": 128
+ "max": 128,
+ "step": 1
},
"depend_or": ["is-erase-bkg==true"]
},
"sharpen": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "锐化与模糊",
"desc": "选择锐化效果或模糊效果",
"type": "string",
@@ -148,7 +248,14 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-morr": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "去除摩尔纹",
"desc": "去除图像中的摩尔纹",
"type": "bool",
@@ -158,7 +265,14 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-grid": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "除网纹",
"desc": "去除图像中的网纹",
"type": "bool",
@@ -168,7 +282,14 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-err-extension": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "错误扩散",
"desc": "以点阵形式构建图像",
"type": "bool",
@@ -178,7 +299,14 @@
"depend_or": ["mode==黑白"]
},
"is-noise-optimize": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "黑白图像噪点优化",
"desc": "去除图像中的孤立黑点",
"type": "bool",
@@ -188,7 +316,14 @@
"depend_or": ["mode==黑白"]
},
"noise-size": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 噪点优化尺寸",
"desc": "设置需要去除的黑色孤立点的连通个数",
"type": "int",
@@ -197,12 +332,20 @@
"size": 4,
"range": {
"min": 1,
- "max": 50
+ "max": 50,
+ "step": 1
},
"depend_or": ["is-noise-optimize==true"]
},
"paper": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "纸张尺寸",
"desc": "设置出图大小",
"type": "string",
@@ -212,7 +355,14 @@
"range": ["A4", "A5", "A5横向", "A6", "A6横向", "B5", "B5横向", "B6", "B6横向", "匹配原始尺寸", "最大扫描尺寸自动裁切", "最大扫描尺寸"]
},
"is-custom-area": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "自定义扫描区域",
"desc": "自定义扫描区域",
"type": "bool",
@@ -222,7 +372,14 @@
"depend_and": ["paper!=匹配原始尺寸", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切"]
},
"tl-x": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描区域左侧(mm)",
"desc": "自定义扫描区域左上角x坐标",
"type": "float",
@@ -231,12 +388,20 @@
"size": 4,
"range": {
"min": 0.000000,
- "max": 210.000000
+ "max": 210.000000,
+ "step": 21.000000
},
"depend_and": ["is-custom-area==true"]
},
"br-x": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描区域右侧(mm)",
"desc": "自定义扫描区域右下角x坐标",
"type": "float",
@@ -245,12 +410,20 @@
"size": 4,
"range": {
"min": 0.000000,
- "max": 210.000000
+ "max": 210.000000,
+ "step": 21.000000
},
"depend_and": ["is-custom-area==true"]
},
"tl-y": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描区域上侧(mm)",
"desc": "自定义扫描区域左上角y坐标",
"type": "float",
@@ -259,12 +432,20 @@
"size": 4,
"range": {
"min": 0.000000,
- "max": 297.000000
+ "max": 297.000000,
+ "step": 29.700000
},
"depend_and": ["is-custom-area==true"]
},
"br-y": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描区域下侧(mm)",
"desc": "自定义扫描区域右下角y坐标",
"type": "float",
@@ -273,12 +454,20 @@
"size": 4,
"range": {
"min": 0.000000,
- "max": 297.000000
+ "max": 297.000000,
+ "step": 29.700000
},
"depend_and": ["is-custom-area==true"]
},
"page": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描页面",
"desc": "设置页面扫描方式",
"type": "string",
@@ -288,7 +477,14 @@
"range": ["单面", "双面", "跳过空白页(通用)", "跳过空白页(发票纸)", "对折"]
},
"blank-sensitivity": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 跳过空白页灵敏度",
"desc": "数值越大,则越容易跳过",
"type": "int",
@@ -297,12 +493,20 @@
"size": 4,
"range": {
"min": 1,
- "max": 100
+ "max": 100,
+ "step": 1
},
"depend_or": ["page==跳过空白页(通用)", "==跳过空白页(发票纸)"]
},
"fold-type": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "对折模式",
"desc": "",
"type": "string",
@@ -313,7 +517,14 @@
"depend_or": ["page==对折"]
},
"resolution": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "分辨率",
"desc": "设置扫描图像的分辨率",
"type": "int",
@@ -322,11 +533,19 @@
"size": 4,
"range": {
"min": 1,
- "max": 600
+ "max": 600,
+ "step": 1
}
},
"is-exchange": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "交换正反面",
"desc": "交换每张文稿的正反面出图顺序",
"type": "bool",
@@ -336,12 +555,26 @@
"depend_and": ["page!=单面"]
},
"grp-2": {
- "category": "base",
+ "cat": "base",
"title": "亮度",
- "type": "group"
+ "type": "group",
+ "readonly": false,
+ "affect": 0,
+ "group": "light",
+ "field": "Common",
+ "pos": 0,
+ "visible": true,
+ "unit": "None"
},
"is-custom-gamma": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "light",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "启用色调曲线",
"desc": "自定义图像色调效果",
"type": "bool",
@@ -350,7 +583,14 @@
"size": 4
},
"brightness": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "light",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "亮度值",
"desc": "调整图像亮度",
"type": "int",
@@ -359,12 +599,20 @@
"size": 4,
"range": {
"min": 1,
- "max": 255
+ "max": 255,
+ "step": 1
},
"depend_and": ["is-custom-gamma==false"]
},
"contrast": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "light",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "对比度",
"desc": "调整图像对比度",
"type": "int",
@@ -373,12 +621,20 @@
"size": 4,
"range": {
"min": 1,
- "max": 7
+ "max": 7,
+ "step": 1
},
"depend_and": ["is-custom-gamma==false"]
},
"gamma": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "light",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "伽马值",
"desc": "调整图像伽玛值",
"type": "float",
@@ -387,17 +643,32 @@
"size": 4,
"range": {
"min": 0.010000,
- "max": 5.000000
+ "max": 5.000000,
+ "step": 0.499000
},
"depend_and": ["is-custom-gamma==false"]
},
"grp-3": {
- "category": "base",
+ "cat": "base",
"title": "图像处理",
- "type": "group"
+ "type": "group",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "field": "Common",
+ "pos": 0,
+ "visible": true,
+ "unit": "None"
},
"is-anti-skew": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "自动纠偏",
"desc": "自动纠正歪斜送入的文稿图像",
"type": "bool",
@@ -407,7 +678,14 @@
"depend_or": ["page!=对折"]
},
"is-split": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "图像拆分",
"desc": "自动拆分图像",
"type": "bool",
@@ -417,7 +695,14 @@
"depend_or": ["page!=对折"]
},
"is-erase-black-frame": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "消除黑框",
"desc": "消除文稿范围外的黑色背景",
"type": "bool",
@@ -426,7 +711,14 @@
"size": 4
},
"bkg-fill-mode": {
- "category": "advanced",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "背景填充方式",
"desc": "选择背景填充方式",
"type": "string",
@@ -437,7 +729,14 @@
"depend_or": ["is-erase-black-frame==true"]
},
"is-fill-color": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "色彩填充",
"desc": "启用后黑框部分将填充为文稿底色",
"type": "bool",
@@ -447,7 +746,14 @@
"depend_and": ["is-erase-black-frame==true"]
},
"threshold": {
- "category": "advanced",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "阈值",
"desc": "文稿底色与黑色背景灰度值的差值大于该值,才会被识别为文稿",
"type": "int",
@@ -456,12 +762,20 @@
"size": 4,
"range": {
"min": 30,
- "max": 50
+ "max": 50,
+ "step": 1
},
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"anti-noise-level": {
- "category": "advanced",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "背景抗噪等级",
"desc": "能够容忍的背景杂色条纹的宽度",
"type": "int",
@@ -470,12 +784,20 @@
"size": 4,
"range": {
"min": 1,
- "max": 20
+ "max": 20,
+ "step": 1
},
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"margin": {
- "category": "advanced",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "边缘缩进",
"desc": "寻找文稿边缘时对边缘的侵入程度",
"type": "int",
@@ -484,12 +806,20 @@
"size": 4,
"range": {
"min": 5,
- "max": 30
+ "max": 30,
+ "step": 1
},
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸自动裁切", "==最大扫描尺寸", "is-anti-skew==true"]
},
"is-dark-sample": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "深色样张",
"desc": "启用该模式防止深色底色的文稿图像被误处理",
"type": "bool",
@@ -499,7 +829,14 @@
"depend_and": ["page!=对折", "is-erase-black-frame!=true", "paper!=匹配原始尺寸", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切", "is-anti-skew!=true"]
},
"is-anti-permeate": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "防止渗透",
"desc": "防止背面图案渗透",
"type": "bool",
@@ -508,7 +845,14 @@
"size": 4
},
"permeate-level": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 防止渗透等级",
"desc": "选择防止渗透的等级",
"type": "string",
@@ -519,7 +863,14 @@
"depend_or": ["is-anti-permeate==true"]
},
"is-rid-hole-l": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "穿孔移除—左侧",
"desc": "穿孔在纸张上的左侧",
"type": "bool",
@@ -528,7 +879,14 @@
"size": 4
},
"search-hole-range-l": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 左侧穿孔搜索范围占幅面比例",
"desc": "穿孔搜索范围占幅面比例",
"type": "float",
@@ -537,12 +895,20 @@
"size": 4,
"range": {
"min": 0.000000,
- "max": 0.500000
+ "max": 0.500000,
+ "step": 0.050000
},
"depend_or": ["is-rid-hole-l==true"]
},
"is-rid-hole-r": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "穿孔移除—右侧",
"desc": "穿孔在纸张上的右侧",
"type": "bool",
@@ -551,7 +917,14 @@
"size": 4
},
"search-hole-range-r": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 右侧穿孔搜索范围占幅面比例",
"desc": "穿孔搜索范围占幅面比例",
"type": "float",
@@ -560,12 +933,20 @@
"size": 4,
"range": {
"min": 0.000000,
- "max": 0.500000
+ "max": 0.500000,
+ "step": 0.050000
},
"depend_or": ["is-rid-hole-r==true"]
},
"is-rid-hole-t": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "穿孔移除—上侧",
"desc": "穿孔在纸张的上部",
"type": "bool",
@@ -574,7 +955,14 @@
"size": 4
},
"search-hole-range-t": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 上侧穿孔搜索范围占幅面比例",
"desc": "穿孔搜索范围占幅面比例",
"type": "float",
@@ -583,12 +971,20 @@
"size": 4,
"range": {
"min": 0.000000,
- "max": 0.500000
+ "max": 0.500000,
+ "step": 0.050000
},
"depend_or": ["is-rid-hole-t==true"]
},
"is-rid-hole-b": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "穿孔移除—下侧",
"desc": "穿孔在纸张的下部",
"type": "bool",
@@ -597,7 +993,14 @@
"size": 4
},
"search-hole-range-b": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 下侧穿孔搜索范围占幅面比例",
"desc": "穿孔搜索范围占幅面比例",
"type": "float",
@@ -606,17 +1009,32 @@
"size": 4,
"range": {
"min": 0.000000,
- "max": 0.500000
+ "max": 0.500000,
+ "step": 0.050000
},
"depend_or": ["is-rid-hole-b==true"]
},
"grp-4": {
- "category": "base",
+ "cat": "base",
"title": "送纸方式设置",
- "type": "group"
+ "type": "group",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "field": "Common",
+ "pos": 0,
+ "visible": true,
+ "unit": "None"
},
"scan-mode": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描张数",
"desc": "选择指定数量扫描或连续扫描",
"type": "string",
@@ -626,7 +1044,14 @@
"range": ["连续扫描", "扫描指定张数"]
},
"scan-count": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 扫描数量",
"desc": "扫描指定数量",
"type": "int",
@@ -636,7 +1061,14 @@
"depend_or": ["scan-mode==扫描指定张数"]
},
"direction": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "文稿方向",
"desc": "设置图像的方向",
"type": "string",
@@ -646,7 +1078,14 @@
"range": ["0°", "90°", "180°", "-90°", "自动文本方向识别°"]
},
"is-rotate-bkg-180": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "背面旋转180°",
"desc": "背面扫描的图像旋转180°",
"type": "bool",
@@ -656,7 +1095,14 @@
"depend_and": ["page!=单面", "!=对折", "direction!=自动文本方向识别°"]
},
"is-ultrosonic": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "超声波检测",
"desc": "检测是否出现双张送入",
"type": "bool",
diff --git a/docs/G400.txt b/docs/G400.txt
index 63c9c72..ebf230c 100644
--- a/docs/G400.txt
+++ b/docs/G400.txt
@@ -4,7 +4,14 @@
"option_count": 63
},
"restore": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "none",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "恢复默认设置",
"desc": "恢复默认设置",
"type": "button",
@@ -13,7 +20,14 @@
"size": 0
},
"help": {
- "category": "advanced",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "none",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "帮助",
"desc": "显示软件帮助文档",
"type": "button",
@@ -22,12 +36,26 @@
"size": 4
},
"grp-1": {
- "category": "base",
+ "cat": "base",
"title": "基本设置",
- "type": "group"
+ "type": "group",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "field": "Common",
+ "pos": 0,
+ "visible": true,
+ "unit": "None"
},
"is-multiout": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "多流输出",
"desc": "同时输出多种颜色模式的图像",
"type": "bool",
@@ -36,7 +64,14 @@
"size": 4
},
"multiout-type": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "多流输出类型",
"desc": "选择多流输出的类型",
"type": "string",
@@ -47,7 +82,14 @@
"depend_or": ["is-multiout==true"]
},
"mode": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "颜色模式",
"desc": "选择色彩模式",
"type": "string",
@@ -58,7 +100,14 @@
"depend_or": ["is-multiout==false"]
},
"binary-threshold": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "黑白图像阈值",
"desc": "高于该阈值为1(白),低于该阈值为0(黑)",
"type": "int",
@@ -70,20 +119,34 @@
"max": 255,
"step": 1
},
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"reverse-bw": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "黑白图像反色输出",
"desc": "输出的黑白图像以“1”代表黑色,“0”代表白色",
"type": "bool",
"cur": false,
"default": false,
"size": 4,
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"filter": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "灰度或黑白图像 - 除色与增强",
"desc": "消除或增强指定色彩",
"type": "string",
@@ -94,7 +157,14 @@
"depend_and": ["is-multiout!=true", "mode!=24位彩色", "!=颜色自动识别"]
},
"is-rid-multiout-red": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "24位彩色图像 - 多流输出除红",
"desc": "同时输出彩色图像和灰度除红图像",
"type": "bool",
@@ -104,7 +174,14 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-rid-answer-sheet-red": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "24位彩色图像 - 答题卡除红",
"desc": "输出除红彩色图像",
"type": "bool",
@@ -114,7 +191,14 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-erase-bkg": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "背景移除",
"desc": "移除文稿背景底色",
"type": "bool",
@@ -124,7 +208,14 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"bkg-color-range": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 背景色彩浮动范围",
"desc": "与背景底色偏差在该值范围内的颜色,都将被移除",
"type": "int",
@@ -139,7 +230,14 @@
"depend_or": ["is-erase-bkg==true"]
},
"sharpen": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "锐化与模糊",
"desc": "选择锐化效果或模糊效果",
"type": "string",
@@ -150,7 +248,14 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-morr": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "去除摩尔纹",
"desc": "去除图像中的摩尔纹",
"type": "bool",
@@ -160,7 +265,14 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-grid": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "除网纹",
"desc": "去除图像中的网纹",
"type": "bool",
@@ -170,7 +282,14 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-err-extension": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "错误扩散",
"desc": "以点阵形式构建图像",
"type": "bool",
@@ -180,7 +299,14 @@
"depend_or": ["mode==黑白"]
},
"is-noise-optimize": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "黑白图像噪点优化",
"desc": "去除图像中的孤立黑点",
"type": "bool",
@@ -190,7 +316,14 @@
"depend_or": ["mode==黑白"]
},
"noise-size": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 噪点优化尺寸",
"desc": "设置需要去除的黑色孤立点的连通个数",
"type": "int",
@@ -205,7 +338,14 @@
"depend_or": ["is-noise-optimize==true"]
},
"paper": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "纸张尺寸",
"desc": "设置出图大小",
"type": "string",
@@ -215,7 +355,14 @@
"range": ["A3", "A4", "A4横向", "A5", "A5横向", "A6", "A6横向", "B4", "B5", "B5横向", "B6", "B6横向", "Letter", "Letter横向", "Double Letter", "LEGAL", "匹配原始尺寸", "最大扫描尺寸自动裁切", "最大扫描尺寸", "三联试卷"]
},
"is-custom-area": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "自定义扫描区域",
"desc": "自定义扫描区域",
"type": "bool",
@@ -225,7 +372,14 @@
"depend_and": ["paper!=匹配原始尺寸", "!=三联试卷", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切"]
},
"tl-x": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描区域左侧(mm)",
"desc": "自定义扫描区域左上角x坐标",
"type": "float",
@@ -240,7 +394,14 @@
"depend_and": ["is-custom-area==true"]
},
"br-x": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描区域右侧(mm)",
"desc": "自定义扫描区域右下角x坐标",
"type": "float",
@@ -255,7 +416,14 @@
"depend_and": ["is-custom-area==true"]
},
"tl-y": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描区域上侧(mm)",
"desc": "自定义扫描区域左上角y坐标",
"type": "float",
@@ -270,7 +438,14 @@
"depend_and": ["is-custom-area==true"]
},
"br-y": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描区域下侧(mm)",
"desc": "自定义扫描区域右下角y坐标",
"type": "float",
@@ -285,7 +460,14 @@
"depend_and": ["is-custom-area==true"]
},
"page": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描页面",
"desc": "设置页面扫描方式",
"type": "string",
@@ -295,7 +477,14 @@
"range": ["单面", "双面", "跳过空白页(通用)", "跳过空白页(发票纸)", "对折"]
},
"blank-sensitivity": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 跳过空白页灵敏度",
"desc": "数值越大,则越容易跳过",
"type": "int",
@@ -310,7 +499,14 @@
"depend_or": ["page==跳过空白页(发票纸)", "==跳过空白页(通用)"]
},
"fold-type": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "对折模式",
"desc": "",
"type": "string",
@@ -321,7 +517,14 @@
"depend_or": ["page==对折"]
},
"resolution": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "分辨率",
"desc": "设置扫描图像的分辨率",
"type": "int",
@@ -335,7 +538,14 @@
}
},
"image-quality": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "画质",
"desc": "",
"type": "string",
@@ -346,7 +556,14 @@
"depend_or": ["resolution>=300"]
},
"is-exchange": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "base",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "交换正反面",
"desc": "交换每张文稿的正反面出图顺序",
"type": "bool",
@@ -356,12 +573,26 @@
"depend_and": ["page!=单面"]
},
"grp-2": {
- "category": "base",
+ "cat": "base",
"title": "亮度",
- "type": "group"
+ "type": "group",
+ "readonly": false,
+ "affect": 0,
+ "group": "light",
+ "field": "Common",
+ "pos": 0,
+ "visible": true,
+ "unit": "None"
},
"is-custom-gamma": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "light",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "启用色调曲线",
"desc": "自定义图像色调效果",
"type": "bool",
@@ -370,7 +601,14 @@
"size": 4
},
"brightness": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "light",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "亮度值",
"desc": "调整图像亮度",
"type": "int",
@@ -384,7 +622,14 @@
}
},
"contrast": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "light",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "对比度",
"desc": "调整图像对比度",
"type": "int",
@@ -398,7 +643,14 @@
}
},
"gamma": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "light",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "伽马值",
"desc": "调整图像伽玛值",
"type": "float",
@@ -412,12 +664,26 @@
}
},
"grp-3": {
- "category": "base",
+ "cat": "base",
"title": "图像处理",
- "type": "group"
+ "type": "group",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "field": "Common",
+ "pos": 0,
+ "visible": true,
+ "unit": "None"
},
"is-anti-skew": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "自动纠偏",
"desc": "自动纠正歪斜送入的文稿图像",
"type": "bool",
@@ -427,7 +693,14 @@
"depend_or": ["page!=对折"]
},
"is-split": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "图像拆分",
"desc": "自动拆分图像",
"type": "bool",
@@ -437,7 +710,14 @@
"depend_or": ["page!=对折"]
},
"is-erase-black-frame": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "消除黑框",
"desc": "消除文稿范围外的黑色背景",
"type": "bool",
@@ -446,7 +726,14 @@
"size": 4
},
"bkg-fill-mode": {
- "category": "advanced",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "背景填充方式",
"desc": "选择背景填充方式",
"type": "string",
@@ -457,7 +744,14 @@
"depend_or": ["is-erase-black-frame==true"]
},
"is-fill-color": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "色彩填充",
"desc": "启用后黑框部分将填充为文稿底色",
"type": "bool",
@@ -467,7 +761,14 @@
"depend_and": ["is-erase-black-frame==true"]
},
"threshold": {
- "category": "advanced",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "阈值",
"desc": "文稿底色与黑色背景灰度值的差值大于该值,才会被识别为文稿",
"type": "int",
@@ -482,7 +783,14 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"anti-noise-level": {
- "category": "advanced",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "背景抗噪等级",
"desc": "能够容忍的背景杂色条纹的宽度",
"type": "int",
@@ -497,7 +805,14 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"margin": {
- "category": "advanced",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "边缘缩进",
"desc": "寻找文稿边缘时对边缘的侵入程度",
"type": "int",
@@ -512,7 +827,14 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸自动裁切", "==最大扫描尺寸", "is-anti-skew==true"]
},
"is-dark-sample": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "深色样张",
"desc": "启用该模式防止深色底色的文稿图像被误处理",
"type": "bool",
@@ -522,7 +844,14 @@
"depend_and": ["page!=对折", "is-erase-black-frame!=true", "paper!=匹配原始尺寸", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切", "is-anti-skew!=true"]
},
"is-anti-permeate": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "防止渗透",
"desc": "防止背面图案渗透",
"type": "bool",
@@ -531,7 +860,14 @@
"size": 4
},
"permeate-level": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 防止渗透等级",
"desc": "选择防止渗透的等级",
"type": "string",
@@ -542,7 +878,14 @@
"depend_or": ["is-anti-permeate==true"]
},
"is-rid-hole-l": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "穿孔移除—左侧",
"desc": "穿孔在纸张上的左侧",
"type": "bool",
@@ -551,7 +894,14 @@
"size": 4
},
"search-hole-range-l": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 左侧穿孔搜索范围占幅面比例",
"desc": "穿孔搜索范围占幅面比例",
"type": "float",
@@ -566,7 +916,14 @@
"depend_or": ["is-rid-hole-l==true"]
},
"is-rid-hole-r": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "穿孔移除—右侧",
"desc": "穿孔在纸张上的右侧",
"type": "bool",
@@ -575,7 +932,14 @@
"size": 4
},
"search-hole-range-r": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 右侧穿孔搜索范围占幅面比例",
"desc": "穿孔搜索范围占幅面比例",
"type": "float",
@@ -590,7 +954,14 @@
"depend_or": ["is-rid-hole-r==true"]
},
"is-rid-hole-t": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "穿孔移除—上侧",
"desc": "穿孔在纸张的上部",
"type": "bool",
@@ -599,7 +970,14 @@
"size": 4
},
"search-hole-range-t": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 上侧穿孔搜索范围占幅面比例",
"desc": "穿孔搜索范围占幅面比例",
"type": "float",
@@ -614,7 +992,14 @@
"depend_or": ["is-rid-hole-t==true"]
},
"is-rid-hole-b": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "穿孔移除—下侧",
"desc": "穿孔在纸张的下部",
"type": "bool",
@@ -623,7 +1008,14 @@
"size": 4
},
"search-hole-range-b": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "imgproc",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 下侧穿孔搜索范围占幅面比例",
"desc": "穿孔搜索范围占幅面比例",
"type": "float",
@@ -638,12 +1030,26 @@
"depend_or": ["is-rid-hole-b==true"]
},
"grp-4": {
- "category": "base",
+ "cat": "base",
"title": "送纸方式设置",
- "type": "group"
+ "type": "group",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "field": "Common",
+ "pos": 0,
+ "visible": true,
+ "unit": "None"
},
"scan-mode": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "扫描张数",
"desc": "选择指定数量扫描或连续扫描",
"type": "string",
@@ -653,7 +1059,14 @@
"range": ["连续扫描", "扫描指定张数"]
},
"scan-count": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": " 扫描数量",
"desc": "扫描指定数量",
"type": "int",
@@ -663,7 +1076,14 @@
"depend_or": ["scan-mode==扫描指定张数"]
},
"direction": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "文稿方向",
"desc": "设置图像的方向",
"type": "string",
@@ -673,7 +1093,14 @@
"range": ["0°", "90°", "180°", "-90°", "自动文本方向识别°"]
},
"is-rotate-bkg-180": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "背面旋转180°",
"desc": "背面扫描的图像旋转180°",
"type": "bool",
@@ -683,7 +1110,14 @@
"depend_and": ["page!=单面", "!=对折", "direction!=自动文本方向识别°"]
},
"is-ultrosonic": {
- "category": "base",
+ "cat": "base",
+ "readonly": false,
+ "affect": 0,
+ "group": "feeder",
+ "visible": true,
+ "field": "Common",
+ "pos": 0,
+ "unit": "None",
"title": "超声波检测",
"desc": "检测是否出现双张送入",
"type": "bool",
diff --git a/docs/G402.txt b/docs/G402.txt
index 7ea07ab..91f2f40 100644
--- a/docs/G402.txt
+++ b/docs/G402.txt
@@ -4,10 +4,10 @@
"option_count": 63
},
"restore": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "none",
"visible": true,
"field": "Common",
"pos": 0,
@@ -20,10 +20,10 @@
"size": 0
},
"help": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "none",
"visible": true,
"field": "Common",
"pos": 0,
@@ -36,22 +36,22 @@
"size": 4
},
"grp-1": {
- "category": "base",
+ "cat": "base",
"title": "基本设置",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-multiout": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -64,10 +64,10 @@
"size": 4
},
"multiout-type": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -82,10 +82,10 @@
"depend_or": ["is-multiout==true"]
},
"mode": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -100,10 +100,10 @@
"depend_or": ["is-multiout==false"]
},
"binary-threshold": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -119,13 +119,13 @@
"max": 255,
"step": 1
},
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"reverse-bw": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -136,13 +136,13 @@
"cur": false,
"default": false,
"size": 4,
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"filter": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -157,10 +157,10 @@
"depend_and": ["is-multiout!=true", "mode!=24位彩色", "!=颜色自动识别"]
},
"is-rid-multiout-red": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -174,10 +174,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-rid-answer-sheet-red": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -191,10 +191,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-erase-bkg": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -208,10 +208,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"bkg-color-range": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -230,10 +230,10 @@
"depend_or": ["is-erase-bkg==true"]
},
"sharpen": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -248,10 +248,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-morr": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -265,10 +265,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-grid": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -282,10 +282,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-err-extension": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -299,10 +299,10 @@
"depend_or": ["mode==黑白"]
},
"is-noise-optimize": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -316,10 +316,10 @@
"depend_or": ["mode==黑白"]
},
"noise-size": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -338,10 +338,10 @@
"depend_or": ["is-noise-optimize==true"]
},
"paper": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -355,10 +355,10 @@
"range": ["A3", "A4", "A4横向", "A5", "A5横向", "A6", "A6横向", "B4", "B5", "B5横向", "B6", "B6横向", "Letter", "Letter横向", "Double Letter", "LEGAL", "匹配原始尺寸"]
},
"is-custom-area": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -372,10 +372,10 @@
"depend_and": ["paper!=匹配原始尺寸", "!=三联试卷", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切"]
},
"tl-x": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -394,10 +394,10 @@
"depend_and": ["is-custom-area==true"]
},
"br-x": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -416,10 +416,10 @@
"depend_and": ["is-custom-area==true"]
},
"tl-y": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -438,10 +438,10 @@
"depend_and": ["is-custom-area==true"]
},
"br-y": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -460,10 +460,10 @@
"depend_and": ["is-custom-area==true"]
},
"page": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -477,10 +477,10 @@
"range": ["单面", "双面", "跳过空白页(通用)", "跳过空白页(发票纸)", "对折"]
},
"blank-sensitivity": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -499,10 +499,10 @@
"depend_or": ["page==跳过空白页(发票纸)", "==跳过空白页(通用)"]
},
"fold-type": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -517,10 +517,10 @@
"depend_or": ["page==对折"]
},
"resolution": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -538,10 +538,10 @@
}
},
"is-exchange": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -555,22 +555,22 @@
"depend_and": ["page!=单面"]
},
"grp-2": {
- "category": "base",
+ "cat": "base",
"title": "亮度",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-custom-gamma": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -583,10 +583,10 @@
"size": 4
},
"brightness": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -604,10 +604,10 @@
}
},
"contrast": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -625,10 +625,10 @@
}
},
"gamma": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -646,22 +646,22 @@
}
},
"grp-3": {
- "category": "base",
+ "cat": "base",
"title": "图像处理",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"color-correction": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -675,10 +675,10 @@
"depend_or": ["mode==24位彩色"]
},
"is-anti-skew": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -692,10 +692,10 @@
"depend_or": ["page!=对折"]
},
"is-split": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -709,10 +709,10 @@
"depend_or": ["page!=对折"]
},
"is-erase-black-frame": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -725,10 +725,10 @@
"size": 4
},
"bkg-fill-mode": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -743,10 +743,10 @@
"depend_or": ["is-erase-black-frame==true"]
},
"is-fill-color": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -760,10 +760,10 @@
"depend_and": ["is-erase-black-frame==true"]
},
"threshold": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -782,10 +782,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"anti-noise-level": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -804,10 +804,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"margin": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -826,10 +826,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸自动裁切", "==最大扫描尺寸", "is-anti-skew==true"]
},
"is-dark-sample": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -843,10 +843,10 @@
"depend_and": ["page!=对折", "is-erase-black-frame!=true", "paper!=匹配原始尺寸", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切", "is-anti-skew!=true"]
},
"is-anti-permeate": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -859,10 +859,10 @@
"size": 4
},
"permeate-level": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -877,10 +877,10 @@
"depend_or": ["is-anti-permeate==true"]
},
"is-rid-hole-l": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -893,10 +893,10 @@
"size": 4
},
"search-hole-range-l": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -915,10 +915,10 @@
"depend_or": ["is-rid-hole-l==true"]
},
"is-rid-hole-r": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -931,10 +931,10 @@
"size": 4
},
"search-hole-range-r": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -953,10 +953,10 @@
"depend_or": ["is-rid-hole-r==true"]
},
"is-rid-hole-t": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -969,10 +969,10 @@
"size": 4
},
"search-hole-range-t": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -991,10 +991,10 @@
"depend_or": ["is-rid-hole-t==true"]
},
"is-rid-hole-b": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1007,10 +1007,10 @@
"size": 4
},
"search-hole-range-b": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1029,22 +1029,22 @@
"depend_or": ["is-rid-hole-b==true"]
},
"grp-4": {
- "category": "base",
+ "cat": "base",
"title": "送纸方式设置",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"scan-mode": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1058,10 +1058,10 @@
"range": ["连续扫描", "扫描指定张数"]
},
"scan-count": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1075,10 +1075,10 @@
"depend_or": ["scan-mode==扫描指定张数"]
},
"direction": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1092,10 +1092,10 @@
"range": ["0°", "90°", "180°", "-90°", "自动文本方向识别°"]
},
"is-rotate-bkg-180": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1109,10 +1109,10 @@
"depend_and": ["page!=单面", "!=对折", "direction!=自动文本方向识别°"]
},
"is-ultrosonic": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
diff --git a/docs/G439.txt b/docs/G439.txt
index a13a15a..29c6e08 100644
--- a/docs/G439.txt
+++ b/docs/G439.txt
@@ -4,10 +4,10 @@
"option_count": 70
},
"restore": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "none",
"visible": true,
"field": "Common",
"pos": 0,
@@ -20,10 +20,10 @@
"size": 0
},
"help": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "none",
"visible": true,
"field": "Common",
"pos": 0,
@@ -36,22 +36,22 @@
"size": 4
},
"grp-1": {
- "category": "base",
+ "cat": "base",
"title": "基本设置",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-multiout": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -64,10 +64,10 @@
"size": 4
},
"multiout-type": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -82,10 +82,10 @@
"depend_or": ["is-multiout==true"]
},
"mode": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -100,10 +100,10 @@
"depend_or": ["is-multiout!=true"]
},
"binary-threshold": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -119,13 +119,13 @@
"max": 255,
"step": 1
},
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"reverse-bw": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -136,13 +136,13 @@
"cur": false,
"default": false,
"size": 4,
- "depend_or": ["is-multiout==true", "mode==黑白"]
+ "depend_or": ["multiout-type!=彩色+灰度", "mode==黑白"]
},
"filter": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -157,10 +157,10 @@
"depend_and": ["is-multiout!=true", "mode!=24位彩色", "!=颜色自动识别"]
},
"is-rid-multiout-red": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -174,10 +174,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-rid-answer-sheet-red": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -191,10 +191,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"is-erase-bkg": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -208,10 +208,10 @@
"depend_and": ["is-multiout!=true", "mode!=256级灰度", "!=黑白", "!=颜色自动识别"]
},
"bkg-color-range": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -230,10 +230,10 @@
"depend_or": ["is-erase-bkg==true"]
},
"sharpen": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -248,10 +248,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-morr": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -265,10 +265,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-rid-grid": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -282,10 +282,10 @@
"depend_and": ["is-multiout!=true", "mode!=黑白", "!=颜色自动识别"]
},
"is-err-extension": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -299,10 +299,10 @@
"depend_or": ["mode==黑白"]
},
"is-noise-optimize": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -316,10 +316,10 @@
"depend_or": ["mode==黑白"]
},
"noise-size": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -338,10 +338,10 @@
"depend_or": ["is-noise-optimize==true"]
},
"paper": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -355,10 +355,10 @@
"range": ["A3", "8开", "A4", "A4横向", "16开", "16开横向", "A5", "A5横向", "A6", "A6横向", "B4", "B5", "B5横向", "B6", "B6横向", "Letter", "Letter横向", "Double Letter", "LEGAL", "匹配原始尺寸", "最大扫描尺寸自动裁切", "最大扫描尺寸", "三联试卷"]
},
"is-custom-area": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -372,10 +372,10 @@
"depend_and": ["paper!=匹配原始尺寸", "!=三联试卷", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切"]
},
"tl-x": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -394,10 +394,10 @@
"depend_and": ["is-custom-area==true"]
},
"br-x": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -416,10 +416,10 @@
"depend_and": ["is-custom-area==true"]
},
"tl-y": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -438,10 +438,10 @@
"depend_and": ["is-custom-area==true"]
},
"br-y": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -460,10 +460,10 @@
"depend_and": ["is-custom-area==true"]
},
"is-size-check": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -477,10 +477,10 @@
"depend_or": ["paper==A3", "==A4", "==A4横向", "==A5", "==A5横向", "==A6", "==A6横向", "==B4", "==B5", "==B5横向", "==B6", "==B6横向", "==Double Letter", "==LEGAL", "==Letter", "==Letter横向"]
},
"page": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -494,10 +494,10 @@
"range": ["单面", "双面", "跳过空白页(通用)", "跳过空白页(发票纸)", "对折"]
},
"blank-sensitivity": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -516,10 +516,10 @@
"depend_or": ["page==跳过空白页(通用)", "==跳过空白页(发票纸)"]
},
"fold-type": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -534,10 +534,10 @@
"depend_or": ["page==对折"]
},
"resolution": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -555,10 +555,10 @@
}
},
"image-quality": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -573,10 +573,10 @@
"depend_or": ["resolution>=300"]
},
"is-exchange": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "base",
"visible": true,
"field": "Common",
"pos": 0,
@@ -590,22 +590,22 @@
"depend_and": ["page!=单面"]
},
"grp-2": {
- "category": "base",
+ "cat": "base",
"title": "亮度",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-custom-gamma": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -618,10 +618,10 @@
"size": 4
},
"brightness": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -640,10 +640,10 @@
"depend_and": ["is-custom-gamma==false"]
},
"contrast": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -662,10 +662,10 @@
"depend_and": ["is-custom-gamma==false"]
},
"gamma": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "light",
"visible": true,
"field": "Common",
"pos": 0,
@@ -684,22 +684,22 @@
"depend_and": ["is-custom-gamma==false"]
},
"grp-3": {
- "category": "base",
+ "cat": "base",
"title": "图像处理",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"color-correction": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -713,10 +713,10 @@
"depend_or": ["mode==24位彩色"]
},
"is-anti-skew": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -730,10 +730,10 @@
"depend_or": ["page!=对折"]
},
"is-split": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -747,10 +747,10 @@
"depend_and": ["page!=对折", "!=跳过空白页(发票纸)", "!=跳过空白页(通用)"]
},
"is-erase-black-frame": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -763,10 +763,10 @@
"size": 4
},
"bkg-fill-mode": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -781,10 +781,10 @@
"depend_or": ["is-erase-black-frame==true"]
},
"is-fill-color": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -798,10 +798,10 @@
"depend_and": ["is-erase-black-frame==true"]
},
"threshold": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -820,10 +820,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"anti-noise-level": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -842,10 +842,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸", "==最大扫描尺寸自动裁切", "is-anti-skew==true"]
},
"margin": {
- "category": "advanced",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -864,10 +864,10 @@
"depend_or": ["is-erase-black-frame==true", "paper==匹配原始尺寸", "==最大扫描尺寸自动裁切", "==最大扫描尺寸", "is-anti-skew==true"]
},
"is-dark-sample": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -881,10 +881,10 @@
"depend_and": ["page!=对折", "is-erase-black-frame!=true", "paper!=匹配原始尺寸", "!=最大扫描尺寸", "!=最大扫描尺寸自动裁切", "is-anti-skew!=true"]
},
"is-anti-permeate": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -897,10 +897,10 @@
"size": 4
},
"permeate-level": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -915,10 +915,10 @@
"depend_or": ["is-anti-permeate==true"]
},
"is-rid-hole-l": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -931,10 +931,10 @@
"size": 4
},
"search-hole-range-l": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -949,10 +949,10 @@
"depend_and": ["is-rid-hole-l==true"]
},
"is-rid-hole-r": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -965,10 +965,10 @@
"size": 4
},
"search-hole-range-r": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -983,10 +983,10 @@
"depend_and": ["is-rid-hole-r==true"]
},
"is-rid-hole-t": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -999,10 +999,10 @@
"size": 4
},
"search-hole-range-t": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1017,10 +1017,10 @@
"depend_and": ["is-rid-hole-t==true"]
},
"is-rid-hole-b": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1033,10 +1033,10 @@
"size": 4
},
"search-hole-range-b": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "imgproc",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1051,22 +1051,22 @@
"depend_and": ["is-rid-hole-b==true"]
},
"grp-4": {
- "category": "base",
+ "cat": "base",
"title": "送纸方式设置",
"type": "group",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"field": "Common",
"pos": 0,
"visible": true,
"unit": "None"
},
"is-wait-scan": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1079,10 +1079,10 @@
"size": 4
},
"wait-scan-exit": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1097,10 +1097,10 @@
"depend_or": ["is-wait-scan==true"]
},
"scan-mode": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1115,10 +1115,10 @@
"depend_and": ["is-wait-scan==false"]
},
"scan-count": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1132,10 +1132,10 @@
"depend_and": ["is-wait-scan==false", "scan-mode==扫描指定张数"]
},
"direction": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1149,10 +1149,10 @@
"range": ["0°", "90°", "180°", "-90°", "自动文本方向识别°"]
},
"is-rotate-bkg-180": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1166,10 +1166,10 @@
"depend_and": ["page!=单面", "!=对折", "direction!=自动文本方向识别°"]
},
"is-ultrosonic": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1182,10 +1182,10 @@
"size": 4
},
"is-check-dog-ear": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1198,10 +1198,10 @@
"size": 4
},
"dog-ear-size": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
@@ -1220,10 +1220,10 @@
"depend_or": ["is-check-dog-ear==true"]
},
"time-to-sleep": {
- "category": "base",
+ "cat": "base",
"readonly": false,
- "affect-img": false,
- "hwonly": false,
+ "affect": 0,
+ "group": "feeder",
"visible": true,
"field": "Common",
"pos": 0,
diff --git a/docs/firmware.vsdx b/docs/firmware.vsdx
index aad2790..f05e0c3 100644
Binary files a/docs/firmware.vsdx and b/docs/firmware.vsdx differ
diff --git a/tools/apps/hg-helper/DlgPageErrMsg.cpp b/tools/apps/hg-helper/DlgPageErrMsg.cpp
index 838420d..70482af 100644
--- a/tools/apps/hg-helper/DlgPageErrMsg.cpp
+++ b/tools/apps/hg-helper/DlgPageErrMsg.cpp
@@ -85,6 +85,7 @@ void dlg_err_msg::init_error_items(void)
INSERT_ERROR_MSG(DEVICE_DISTORTION);
INSERT_ERROR_MSG(DEVICE_MAYBE_IS_HOLE);
INSERT_ERROR_MSG(DEVICE_DEVS_BOOTING);
+ INSERT_ERROR_MSG(DEVICE_UNKNOWN_STATUS);
}
BOOL dlg_err_msg::handle_message(UINT msg, WPARAM wp, LPARAM lp)
diff --git a/tools/apps/hg-helper/hg-helper.vcxproj b/tools/apps/hg-helper/hg-helper.vcxproj
index cffe730..bd6945d 100644
--- a/tools/apps/hg-helper/hg-helper.vcxproj
+++ b/tools/apps/hg-helper/hg-helper.vcxproj
@@ -74,15 +74,15 @@
true
$(ProjectDir)..\..\solution\$(Configuration)\
$(OutDir)$(ProjectName)\
- $(ProjectDir)..\..\..\sdk\include\;$(ProjectDir)..\sdk\include\
- $(ProjectDir)..\sdk\lib\$(Configuration)\;$(LibraryPath)
+ $(ProjectDir)..\..\..\..\sdk\include\;$(ProjectDir)..\..\sdk\include\
+ $(ProjectDir)..\..\sdk\lib\;$(LibraryPath)
false
$(ProjectDir)..\..\solution\$(Configuration)\
$(OutDir)$(ProjectName)\
- $(ProjectDir)..\..\..\sdk\include\;$(ProjectDir)..\sdk\include\
- $(ProjectDir)..\sdk\lib\$(Configuration)\;$(LibraryPath)
+ $(ProjectDir)..\..\..\..\sdk\include\;$(ProjectDir)..\..\sdk\include\
+ $(ProjectDir)..\..\sdk\lib\;$(LibraryPath)
true
diff --git a/tools/apps/hgjson/CDlgMain.cpp b/tools/apps/hgjson/CDlgMain.cpp
index ec32d2b..8d1620f 100644
--- a/tools/apps/hgjson/CDlgMain.cpp
+++ b/tools/apps/hgjson/CDlgMain.cpp
@@ -10,6 +10,7 @@
#include "hgjsonDlg.h"
#include "CDlgLang.h"
#include "DlgTwain.h"
+#include "DlgOptJson.h"
// CDlgMain 对话框
@@ -56,6 +57,10 @@ BOOL CDlgMain::OnInitDialog()
page->Create(CDlgTwain::IDD, this);
insert_page(page, L"TWAIN");
+ page = new CDlgOptJson(this);
+ page->Create(CDlgOptJson::IDD, this);
+ insert_page(page, L"Opt-JSON");
+
tab_.SetCurSel(0);
OnTcnSelchangeTab1(NULL, &lret);
diff --git a/tools/apps/hgjson/DlgOptJson.cpp b/tools/apps/hgjson/DlgOptJson.cpp
new file mode 100644
index 0000000..7ae1017
--- /dev/null
+++ b/tools/apps/hgjson/DlgOptJson.cpp
@@ -0,0 +1,1784 @@
+// DlgInput.cpp : implementation file
+//
+
+#include "stdafx.h"
+#include "hgjson.h"
+#include "DlgOptJson.h"
+#include "afxdialogex.h"
+#include "DlgRange.h"
+
+#include
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// known name ...
+namespace known_name
+{
+ struct
+ {
+ std::wstring name;
+ std::wstring title;
+ }
+ g_group[] = { {L"base", L"\u57FA\u672C\u8BBE\u7F6E"}, {L"imgp", L"\u56FE\u50CF\u5904\u7406"}, {L"feeder", L"\u9001\u7EB8\u65B9\u5F0F"}, {L"advance", L"\u9AD8\u7EA7\u8BBE\u7F6E"}},
+ g_cats[] = { {L"imgp", L"\u56FE\u50CF\u5904\u7406"}};
+
+ static std::wstring group_name(const wchar_t* grp_title)
+ {
+ for (auto& v : g_group)
+ {
+ if (v.title == grp_title)
+ return v.name;
+ }
+
+ return grp_title;
+ }
+ static std::wstring group_title(const wchar_t* grp_name)
+ {
+ if (wcscmp(grp_name, L"imgproc") == 0)
+ grp_name = L"imgp";
+
+ for (auto& v : g_group)
+ {
+ if (v.name == grp_name)
+ return v.title;
+ }
+
+ return grp_name;
+ }
+
+ static std::wstring category_name(const wchar_t* cat_title)
+ {
+ for (auto& v : g_cats)
+ {
+ if (v.title == cat_title)
+ return v.name;
+ }
+
+ return cat_title;
+ }
+ static std::wstring category_title(const wchar_t* cat_name)
+ {
+ if (wcscmp(cat_name, L"imgproc") == 0)
+ cat_name = L"imgp";
+
+ for (auto& v : g_cats)
+ {
+ if (v.name == cat_name)
+ return v.title;
+ }
+
+ return cat_name;
+ }
+};
+
+
+//////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
+// CDlgOptJson dialog
+
+IMPLEMENT_DYNAMIC(CDlgOptJson, CDialogEx)
+
+CDlgOptJson::CDlgOptJson(CWnd* pParent /*=NULL*/)
+ : CDialogEx(CDlgOptJson::IDD, pParent)
+{
+
+}
+
+CDlgOptJson::~CDlgOptJson()
+{
+}
+
+known_file_util::IJsonW* CDlgOptJson::SANEOPT::to_json(void)
+{
+ known_file_util::IJsonW* jsn = known_file_util::create_jsonW(), *dep = NULL;
+ int nv = 0;
+
+ jsn->set_key(name.c_str());
+ jsn->set_value(L"cat", known_name::category_name(category.c_str()).c_str());
+ jsn->set_value(L"group", known_name::group_name(group.c_str()).c_str());
+ jsn->set_value(L"title", title.c_str());
+ jsn->set_value(L"desc", desc.c_str());
+ jsn->set_value(L"ver", ver);
+ jsn->set_value(L"pos", pos);
+ jsn->set_value(L"fix-id", fix_id);
+ jsn->set_value(L"type", type.c_str());
+ jsn->set_value(L"unit", unit.c_str());
+ SANEOPT::affect_str(nv, affect, false);
+ jsn->set_value(L"affect", nv);
+ jsn->set_value(L"readonly", readonly);
+ jsn->set_value(L"visible", open);
+ jsn->set_value(L"enabled", enable);
+ jsn->set_value(L"size", (int)sizeof(int));
+
+ if (type == L"bool")
+ {
+ jsn->set_value(L"cur", *(bool*)def_val.c_str());
+ jsn->set_value(L"default", *(bool*)def_val.c_str());
+ }
+ else if (type == L"int")
+ {
+ known_file_util::IJsonW* rng = NULL;
+
+ jsn->set_value(L"cur", *(int*)def_val.c_str());
+ jsn->set_value(L"default", *(int*)def_val.c_str());
+ if (range_type == L"list")
+ {
+ rng = known_file_util::create_jsonW();
+ rng->set_as_array(true);
+ for (auto& v : range)
+ *rng += *(int*)v.c_str();
+ }
+ else if (range_type == L"range" && range.size() == 3)
+ {
+ rng = known_file_util::create_jsonW();
+ rng->set_value(L"min", *(int*)range[0].c_str());
+ rng->set_value(L"max", *(int*)range[1].c_str());
+ rng->set_value(L"step", *(int*)range[2].c_str());
+ }
+ if (rng)
+ {
+ jsn->set_value(L"range", rng);
+ rng->release();
+ }
+ }
+ else if (type == L"float")
+ {
+ known_file_util::IJsonW* rng = NULL;
+
+ jsn->set_value(L"size", (int)sizeof(double));
+ jsn->set_value(L"cur", *(double*)def_val.c_str());
+ jsn->set_value(L"default", *(double*)def_val.c_str());
+ if (range_type == L"list")
+ {
+ rng = known_file_util::create_jsonW();
+ rng->set_as_array(true);
+ for (auto& v : range)
+ *rng += *(double*)v.c_str();
+ }
+ else if (range_type == L"range" && range.size() == 3)
+ {
+ rng = known_file_util::create_jsonW();
+ rng->set_value(L"min", *(double*)range[0].c_str());
+ rng->set_value(L"max", *(double*)range[1].c_str());
+ rng->set_value(L"step", *(double*)range[2].c_str());
+ }
+ if (rng)
+ {
+ jsn->set_value(L"range", rng);
+ rng->release();
+ }
+ }
+ else if (type == L"string")
+ {
+ int len = def_val.length();
+ jsn->set_value(L"cur", (const wchar_t*)def_val.c_str());
+ jsn->set_value(L"default", (const wchar_t*)def_val.c_str());
+ if (range.size())
+ {
+ known_file_util::IJsonW* rng = known_file_util::create_jsonW();
+ rng->set_as_array(true);
+ for (auto& v : range)
+ {
+ *rng += (const wchar_t*)v.c_str();
+ if (len < v.length())
+ len = v.length();
+ }
+ jsn->set_value(L"range", rng);
+ rng->release();
+ }
+ len += 4;
+ len *= 3;
+ jsn->set_value(L"size", len);
+ }
+
+ if (depends.size())
+ {
+ std::wstring oper(L""), n(L"");
+
+ std::sort(depends.begin(), depends.end());
+ if (depend_oper == L"and")
+ oper = L"depend_and";
+ else if (depend_oper == L"or")
+ oper = L"depend_or";
+
+ if (!oper.empty())
+ {
+ dep = known_file_util::create_jsonW();
+ dep->set_as_array(true);
+ for (auto& v : depends)
+ {
+ std::wstring exp(v), name(coding::name_from_depend_exp(exp));
+
+ if (name.empty())
+ continue;
+
+ if (n != name)
+ {
+ n = name;
+ }
+ else
+ exp.erase(0, name.length());
+ *dep += exp.c_str();
+ }
+
+ jsn->set_value(oper.c_str(), dep);
+ dep->release();
+ }
+ }
+
+ return jsn;
+}
+bool CDlgOptJson::SANEOPT::from_json(known_file_util::IJsonW* jsn)
+{
+ bool ret = true;
+ const wchar_t* strv = NULL;
+ known_file_util::IJsonW* child = NULL;
+
+ SANEOPT::init(this);
+ name = jsn->key() ? jsn->key() : L"";
+ if (jsn->get_value(L"title", &strv) && strv)
+ title = strv;
+
+ if (jsn->get_value(L"desc", &strv) && strv)
+ desc = strv;
+
+ if (jsn->get_value(L"group", &strv) && strv)
+ group = known_name::group_title(strv);
+
+ if (jsn->get_value(L"cat", &strv) && strv)
+ category = known_name::category_title(strv);
+ else if(jsn->get_value(L"field", &strv) && strv)
+ category = known_name::category_title(strv);
+
+ if (jsn->get_value(L"unit", &strv) && strv)
+ unit = strv;
+ std::transform(unit.begin(), unit.end(), unit.begin(), tolower);
+
+ if (jsn->get_value(L"type", &strv) && strv)
+ type = strv;
+ std::transform(type.begin(), type.end(), type.begin(), tolower);
+
+ if (type == L"bool")
+ {
+ bool v = false;
+
+ if (!jsn->get_value(L"default", v))
+ jsn->get_value(L"cur", v);
+ def_val = std::string((char*)&v, sizeof(v));
+ }
+ else if(type == L"int")
+ {
+ int v = 0;
+ if (!jsn->get_value(L"default", v))
+ {
+ if (!jsn->get_value(L"cur", v))
+ {
+ // try uint64 ...
+ unsigned long long n64 = 0;
+ if(jsn->get_value(L"default", n64) || jsn->get_value(L"cur", n64))
+ def_val = std::string((char*) & n64, sizeof(n64));
+ }
+ }
+ if(def_val.empty())
+ def_val = std::string((char*)&v, sizeof(v));
+ }
+ else if(type == L"float")
+ {
+ double v = false;
+ if (!jsn->get_value(L"default", v))
+ jsn->get_value(L"cur", v);
+ def_val = std::string((char*)&v, sizeof(v));
+ }
+ else if(type == L"string")
+ {
+ strv = NULL;
+ if (!jsn->get_value(L"default", &strv))
+ jsn->get_value(L"cur", &strv);
+ def_val = strv ? std::string((const char*)strv, lstrlenW(strv) * 2 + 2) : "";
+ }
+
+ jsn->get_value(L"affect", ver);
+ SANEOPT::affect_str(ver, affect, true);
+ jsn->get_value(L"ver", ver);
+ jsn->get_value(L"pos", pos);
+ jsn->get_value(L"readonly", readonly);
+ jsn->get_value(L"visible", open);
+ jsn->get_value(L"enabled", enable);
+ jsn->get_value(L"fix-id", fix_id);
+
+ if (jsn->get_value(L"range", &child) && child)
+ {
+ if (type == L"int")
+ {
+ int nv = 0;
+ if (child->get_value(L"min", nv))
+ {
+ range_type = L"range";
+ range.push_back(std::string((char*)&nv, sizeof(nv)));
+ child->get_value(L"max", nv);
+ range.push_back(std::string((char*)&nv, sizeof(nv)));
+ child->get_value(L"step", nv);
+ range.push_back(std::string((char*)&nv, sizeof(nv)));
+ }
+ else
+ {
+ range_type = L"list";
+ known_file_util::JSONMEMW m = child->first_member();
+ while (m.type != known_file_util::JV_UNKNOWN)
+ {
+ range.push_back(std::string((char*)&m.int_val, sizeof(m.int_val)));
+ m = child->next_member();
+ }
+ }
+ }
+ else if (type == L"float")
+ {
+ double nv = 0;
+ if (child->get_value(L"min", nv))
+ {
+ range_type = L"range";
+ range.push_back(std::string((char*)&nv, sizeof(nv)));
+ child->get_value(L"max", nv);
+ range.push_back(std::string((char*)&nv, sizeof(nv)));
+ child->get_value(L"step", nv);
+ range.push_back(std::string((char*)&nv, sizeof(nv)));
+ }
+ else
+ {
+ range_type = L"list";
+ known_file_util::JSONMEMW m = child->first_member();
+ while (m.type != known_file_util::JV_UNKNOWN)
+ {
+ range.push_back(std::string((char*)&m.double_val, sizeof(m.double_val)));
+ m = child->next_member();
+ }
+ }
+ }
+ else if (type == L"string")
+ {
+ range_type = L"list";
+ known_file_util::JSONMEMW m = child->first_member();
+ while (m.type != known_file_util::JV_UNKNOWN)
+ {
+ range.push_back(std::string((const char*)m.str_val, lstrlenW(m.str_val) * 2 + 2));
+ m = child->next_member();
+ }
+ }
+ child->release();
+ }
+
+ if (jsn->get_value(L"depend_and", &child) && child)
+ depend_oper = L"and";
+ else if (jsn->get_value(L"depend_or", &child) && child)
+ depend_oper = L"or";
+ if (child)
+ {
+ known_file_util::JSONMEMW m = child->first_member();
+ std::wstring n(L"");
+ while (m.type != known_file_util::JV_UNKNOWN)
+ {
+ std::wstring exp(m.str_val), nm(coding::name_from_depend_exp(exp));
+
+ if (nm.empty())
+ exp.insert(0, n);
+ else
+ n = nm;
+ depends.push_back(exp);
+
+ m = child->next_member();
+ }
+ child->release();
+ }
+
+ return ret;
+}
+
+std::wstring CDlgOptJson::get_item_text(UINT id)
+{
+ int l = GetDlgItem(id)->GetWindowTextLengthW();
+ wchar_t* buf = new wchar_t[l + 4];
+
+ l = GetDlgItem(id)->GetWindowTextW(buf, l + 2);
+ buf[l] = 0;
+
+ std::wstring ret(buf);
+
+ delete[] buf;
+
+ return std::move(ret);
+}
+bool CDlgOptJson::is_button_check(UINT id)
+{
+ return ((CButton*)GetDlgItem(id))->GetCheck() == BST_CHECKED;
+}
+void CDlgOptJson::set_button_check(UINT id, bool check)
+{
+ ((CButton*)GetDlgItem(id))->SetCheck(check ? BST_CHECKED : BST_UNCHECKED);
+}
+
+void CDlgOptJson::from_ui(SANEOPT& sop)
+{
+ std::wstring val(L"");
+
+ sop.name = get_item_text(IDC_EDIT_NAME);
+ sop.title = get_item_text(IDC_EDIT_TITLE);
+ sop.desc = get_item_text(IDC_EDIT_DESCRIPTION);
+
+ sop.group = get_item_text(IDC_COMBO_GROUP);
+ if (group_.FindStringExact(-1, sop.group.c_str()) == -1)
+ group_.AddString(sop.group.c_str());
+
+ sop.category = get_item_text(IDC_COMBO_CATEGORY);
+ if (cat_.FindStringExact(-1, sop.category.c_str()) == -1)
+ cat_.AddString(sop.group.c_str());
+
+ sop.affect = get_item_text(IDC_COMBO_AFFECT);
+ sop.unit = get_item_text(IDC_COMBO_UNIT);
+ sop.ver = GetDlgItemInt(IDC_EDIT_VER);
+ sop.type = get_item_text(IDC_COMBO_DATA_TYPE);
+ sop.pos = GetDlgItemInt(IDC_EDIT_POSITION);
+ //sop.fix_id = GetDlgItemInt(IDC_EDIT_FIXED_ID);
+ sop.fix_id = fix_id_edit_.value();
+ sop.readonly = is_button_check(IDC_CHECK_READONLY);
+ sop.open = is_button_check(IDC_CHECK_PUBLIC);
+ sop.range_type = get_item_text(IDC_COMBO_RANGE);
+
+ if (GetDlgItem(IDC_EDIT_DEFAULT)->IsWindowVisible())
+ val = get_item_text(IDC_EDIT_DEFAULT);
+ else
+ val = get_item_text(IDC_COMBO_DEFAULT);
+ if (sop.type == L"bool")
+ {
+ bool v = val == L"true";
+ sop.def_val = std::string((char*)&v, sizeof(v));
+ }
+ else if (sop.type == L"int")
+ {
+ int v = _wtoi(val.c_str());
+ sop.def_val = std::string((char*)&v, sizeof(v));
+ }
+ else if (sop.type == L"float")
+ {
+ double v = _wtof(val.c_str());
+ sop.def_val = std::string((char*)&v, sizeof(v));
+ }
+ else if (sop.type == L"string")
+ {
+ sop.def_val = std::string((const char*)val.c_str(), val.length() * 2 + 2);
+ }
+ else
+ sop.def_val = "";
+
+ sop.enable = is_button_check(IDC_CHECK_ENABLE);
+ sop.range_type = get_item_text(IDC_COMBO_RANGE);
+ sop.depend_oper = get_item_text(IDC_COMBO_DEPEND);
+ sop.depends.clear();
+ if (sop.depend_oper != L"none")
+ {
+ wchar_t buf[256] = { 0 };
+ for (int i = 0; i < depends_.GetCount(); ++i)
+ {
+ depends_.GetText(i, buf);
+
+ std::wstring exp(buf), n(coding::name_from_depend_exp(exp));
+
+ if (n.empty())
+ continue;
+
+ // title to name ...
+ exp.erase(0, n.length());
+ for (auto& v : opts_)
+ {
+ if (v.title == n)
+ {
+ exp.insert(0, v.name);
+ break;
+ }
+ }
+ sop.depends.push_back(exp);
+ }
+ }
+}
+void CDlgOptJson::to_ui(const SANEOPT& sop)
+{
+ int n = 0;
+
+ ::SetDlgItemTextW(m_hWnd, IDC_EDIT_NAME, sop.name.c_str());
+ ::SetDlgItemTextW(m_hWnd, IDC_EDIT_TITLE, sop.title.c_str());
+ ::SetDlgItemTextW(m_hWnd, IDC_EDIT_DESCRIPTION, sop.desc.c_str());
+
+ n = group_.FindStringExact(-1, sop.group.c_str());
+ if (n == -1)
+ n = group_.AddString(sop.group.c_str());
+ group_.SetCurSel(n);
+
+ n = cat_.FindStringExact(-1, sop.category.c_str());
+ if (n == -1)
+ n = cat_.AddString(sop.category.c_str());
+ cat_.SetCurSel(n);
+
+ n = affect_.FindStringExact(-1, sop.affect.c_str());
+ affect_.SetCurSel(n);
+
+ n = unit_.FindStringExact(-1, sop.unit.c_str());
+ unit_.SetCurSel(n);
+
+ SetDlgItemInt(IDC_EDIT_VER, sop.ver);
+
+ n = type_.FindStringExact(-1, sop.type.c_str());
+ type_.SetCurSel(n);
+
+ SetDlgItemInt(IDC_EDIT_POSITION, sop.pos);
+ //SetDlgItemInt(IDC_EDIT_FIXED_ID, sop.fix_id);
+ fix_id_edit_.set_value(sop.fix_id);
+
+ set_button_check(IDC_CHECK_READONLY, sop.readonly);
+ set_button_check(IDC_CHECK_PUBLIC, sop.open);
+ set_button_check(IDC_CHECK_ENABLE, sop.enable);
+
+ n = range_.FindStringExact(-1, sop.range_type.c_str());
+ range_.SetCurSel(n);
+
+ n = depend_.FindStringExact(-1, sop.depend_oper.c_str());
+ depend_.SetCurSel(n);
+
+ depends_.ResetContent();
+ for (auto& v : sop.depends)
+ {
+ std::wstring n(coding::name_from_depend_exp(v)), str(v);
+
+ if (n.empty())
+ continue;
+
+ // name to title ...
+ str.erase(0, n.length());
+ for (auto& e : opts_)
+ {
+ if (e.name == n)
+ {
+ str.insert(0, e.title);
+ break;
+ }
+ }
+ depends_.AddString(str.c_str());
+ }
+
+ // default value ...
+
+ // depend item ...
+ n = sop.depend_oper != L"none";
+ parent_.EnableWindow(n);
+ logic_.EnableWindow(n);
+ depends_.EnableWindow(n);
+ GetDlgItem(IDC_BUTTON_ADD)->EnableWindow(n);
+ GetDlgItem(IDC_EDIT_LOW)->EnableWindow(n);
+ GetDlgItem(IDC_EDIT_LOW)->ShowWindow(SW_SHOW);
+ GetDlgItem(IDC_COMBO_LOW)->ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_STATIC_AND)->ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_EDIT_BIG)->ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_COMBO_BIG)->ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_BUTTON_SET)->EnableWindow(sop.range_type != L"none");
+
+ parent_.ResetContent();
+ for (auto& v : opts_)
+ {
+ if (v.name == sop.name)
+ continue;
+
+ parent_.AddString(v.title.c_str());
+ }
+
+ OnCbnDataTypeSelchange();
+ OnCbnRangeSelchange();
+ OnCbnDependSelchange();
+
+ // default value ...
+ if (sop.type == L"bool")
+ {
+ GetDlgItem(IDC_EDIT_DEFAULT)->ShowWindow(SW_HIDE);
+ def_val_.ShowWindow(SW_SHOW);
+ def_val_.ResetContent();
+ def_val_.AddString(L"false");
+ def_val_.AddString(L"true");
+ def_val_.SetCurSel(def_val_.FindStringExact(-1, *(bool*)sop.def_val.c_str() ? L"true" : L"false"));
+ }
+ else if (sop.type == L"int")
+ {
+ if (sop.range_type == L"list")
+ {
+ GetDlgItem(IDC_EDIT_DEFAULT)->ShowWindow(SW_HIDE);
+ def_val_.ShowWindow(SW_SHOW);
+ def_val_.ResetContent();
+ for (auto& v : sop.range)
+ {
+ def_val_.AddString(std::to_wstring(*(int*)v.c_str()).c_str());
+ }
+ def_val_.SetCurSel(def_val_.FindStringExact(-1, std::to_wstring(*(int*)sop.def_val.c_str()).c_str()));
+ }
+ else
+ {
+ GetDlgItem(IDC_EDIT_DEFAULT)->ShowWindow(SW_SHOW);
+ SetDlgItemInt(IDC_EDIT_DEFAULT, *(int*)sop.def_val.c_str());
+ def_val_.ShowWindow(SW_HIDE);
+ }
+ }
+ else if (sop.type == L"float")
+ {
+ if (sop.range_type == L"list")
+ {
+ GetDlgItem(IDC_EDIT_DEFAULT)->ShowWindow(SW_HIDE);
+ def_val_.ShowWindow(SW_SHOW);
+ def_val_.ResetContent();
+ for (auto& v : sop.range)
+ {
+ def_val_.AddString(std::to_wstring(*(double*)v.c_str()).c_str());
+ }
+ def_val_.SetCurSel(def_val_.FindStringExact(-1, std::to_wstring(*(double*)sop.def_val.c_str()).c_str()));
+ }
+ else
+ {
+ GetDlgItem(IDC_EDIT_DEFAULT)->ShowWindow(SW_SHOW);
+ SetDlgItemInt(IDC_EDIT_DEFAULT, *(double*)sop.def_val.c_str());
+ def_val_.ShowWindow(SW_HIDE);
+ }
+ }
+ else if (sop.type == L"string")
+ {
+ if (sop.range_type == L"list")
+ {
+ GetDlgItem(IDC_EDIT_DEFAULT)->ShowWindow(SW_HIDE);
+ def_val_.ShowWindow(SW_SHOW);
+ def_val_.ResetContent();
+ for (auto& v : sop.range)
+ {
+ def_val_.AddString((const wchar_t*)v.c_str());
+ }
+ def_val_.SetCurSel(def_val_.FindStringExact(-1, (const wchar_t*)sop.def_val.c_str()));
+ }
+ else
+ {
+ GetDlgItem(IDC_EDIT_DEFAULT)->ShowWindow(SW_SHOW);
+ SetDlgItemText(IDC_EDIT_DEFAULT, (const wchar_t*)sop.def_val.c_str());
+ def_val_.ShowWindow(SW_HIDE);
+ }
+ }
+}
+HTREEITEM CDlgOptJson::insert_new_item(const SANEOPT& opt, bool sel)
+{
+ HTREEITEM item = tree_.InsertItem(opt.title.c_str());
+ wchar_t* name = new wchar_t[opt.name.length() + 2];
+
+ wcscpy(name, opt.name.c_str());
+ if (!tree_.SetItemData(item, (DWORD_PTR)name))
+ delete[] name;
+
+ opts_.push_back(opt);
+ if (sel)
+ {
+ tree_.SelectItem(item);
+ tree_.EnsureVisible(item);
+ }
+
+ return item;
+}
+void CDlgOptJson::delete_from_tree(const wchar_t* name)
+{
+ if (name)
+ {
+ HTREEITEM item = tree_.GetRootItem();
+ while (item)
+ {
+ wchar_t* buf = (wchar_t*)tree_.GetItemData(item);
+ if (buf && wcscmp(buf, name) == 0)
+ {
+ delete[] buf;
+ tree_.DeleteItem(item);
+ break;
+ }
+
+ item = tree_.GetNextSiblingItem(item);
+ }
+ }
+ else
+ {
+ HTREEITEM item = tree_.GetRootItem();
+ while (item)
+ {
+ wchar_t* buf = (wchar_t*)tree_.GetItemData(item);
+ if (buf)
+ delete[] buf;
+ item = tree_.GetNextSiblingItem(item);
+ }
+ tree_.DeleteAllItems();
+ }
+}
+HTREEITEM CDlgOptJson::modify_tree_title(const wchar_t* name, const wchar_t* title)
+{
+ HTREEITEM item = tree_.GetRootItem(), found = NULL;
+
+ while (item)
+ {
+ wchar_t* buf = (wchar_t*)tree_.GetItemData(item);
+ if (buf && wcscmp(buf, name) == 0)
+ {
+ tree_.SetItemText(item, title);
+ found = item;
+ break;
+ }
+
+ item = tree_.GetNextSiblingItem(item);
+ }
+
+ return found;
+}
+
+bool CDlgOptJson::load_from_file(const wchar_t* path_file)
+{
+ std::string cont("");
+ std::wstring unic(L"");
+ bool ret = false;
+
+ file_util::load_file(path_file, coding::get_string, &cont);
+ coding_util::bom::to_unicode(cont.c_str(), cont.length(), coding::get_wstring, &unic);
+ if (unic.length())
+ {
+ if (!load_from_json_text(unic.c_str()))
+ {
+ unic = path_file;
+ unic.insert(0, L"Parse json file '");
+ unic += L"' failed";
+ ::MessageBoxW(m_hWnd, unic.c_str(), L"Error", MB_OK);
+ }
+ else
+ ret = true;
+ }
+
+ return ret;
+}
+bool CDlgOptJson::load_from_json_text(const wchar_t* txt, std::wstring* err_msg)
+{
+ int pos = 0;
+ known_file_util::IJsonW* jsn = known_file_util::create_jsonW(txt, &pos), * child = NULL;
+
+ while (!jsn)
+ {
+ // try code-text ...
+ {
+ std::wstring code(txt);
+ size_t splash = code.find(L"\\\\");
+
+ while (splash != std::wstring::npos)
+ {
+ code.erase(splash++, 1);
+ splash = code.find(L"\\\\", splash);
+ }
+
+ splash = code.find(L"\\\"");
+ while (splash != std::wstring::npos)
+ {
+ code.erase(splash++, 1);
+ splash = code.find(L"\\\"", splash);
+ }
+ splash = 0;
+ jsn = known_file_util::create_jsonW(&code[0], (int*)&splash);
+ if (jsn)
+ break;
+ }
+
+ int ep = 10, len = 10;
+ if (lstrlenW(txt + pos) < 10)
+ len = lstrlenW(txt + pos);
+ if (pos < 10)
+ {
+ ep = pos;
+ pos = 10;
+ }
+ pos -= 10;
+
+ std::wstring info(txt + pos, len + ep + 1);
+ wchar_t msg[80] = { 0 };
+
+ swprintf_s(msg, L"Error at position %d of char '%c'!\r\n\r\n", ep, info[ep]);
+ if (err_msg)
+ *err_msg = msg + info;
+ else
+ ::MessageBoxW(m_hWnd, (msg + info).c_str(), L"Load Error", MB_OK);
+
+ return false;
+ }
+
+ delete_from_tree();
+ opts_.clear();
+ child = jsn->first_child();
+ while (child)
+ {
+ SANEOPT opt;
+
+ if (opt.from_json(child))
+ {
+ insert_new_item(opt, false);
+ }
+
+ child->release();
+ child = jsn->next_child();
+ }
+ jsn->release();
+ return true;
+}
+
+void CDlgOptJson::DoDataExchange(CDataExchange* pDX)
+{
+ CDialogEx::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_COMBO_GROUP, group_);
+ DDX_Control(pDX, IDC_COMBO_CATEGORY, cat_);
+ DDX_Control(pDX, IDC_COMBO_AFFECT, affect_);
+ DDX_Control(pDX, IDC_COMBO_UNIT, unit_);
+ DDX_Control(pDX, IDC_COMBO_DATA_TYPE, type_);
+ DDX_Control(pDX, IDC_COMBO_RANGE, range_);
+ DDX_Control(pDX, IDC_COMBO_DEFAULT, def_val_);
+ DDX_Control(pDX, IDC_COMBO_DEPEND, depend_);
+ DDX_Control(pDX, IDC_COMBO_PARENT, parent_);
+ DDX_Control(pDX, IDC_COMBO_LOGIC, logic_);
+ DDX_Control(pDX, IDC_COMBO_LOW, lower_);
+ DDX_Control(pDX, IDC_COMBO_BIG, upper_);
+ DDX_Control(pDX, IDC_COMBO_EXPORT, export_type_);
+ DDX_Control(pDX, IDC_LIST_DEPEND, depends_);
+ DDX_Control(pDX, IDC_TREE2, tree_);
+}
+BOOL CDlgOptJson::OnInitDialog()
+{
+ CDialogEx::OnInitDialog();
+
+ // Set the icon for this dialog. The framework does this automatically
+ // when the application's main window is not a dialog
+ group_.SetCurSel(0);
+ cat_.SetCurSel(0);
+ affect_.SetCurSel(0);
+ unit_.SetCurSel(0);
+ type_.SetCurSel(0);
+ range_.SetCurSel(0);
+ def_val_.SetCurSel(0);
+ depend_.SetCurSel(0);
+
+ parent_.EnableWindow(FALSE);
+ logic_.EnableWindow(FALSE);
+ GetDlgItem(IDC_EDIT_LOW)->EnableWindow(FALSE);
+ depends_.EnableWindow(FALSE);
+ GetDlgItem(IDC_BUTTON_ADD)->EnableWindow(FALSE);
+
+ BITMAP bmi = { 0 };
+ GetObject(LoadBitmap(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDB_BITMAP1)), sizeof(bmi), &bmi);
+ tree_img_.Create(IDB_BITMAP1, bmi.bmWidth / 2, bmi.bmWidth / 2, RGB(255, 255, 255));
+ tree_.SetImageList(&tree_img_, TVSIL_NORMAL);
+
+ tree_menu_.LoadMenu(IDR_MENU1);
+ fix_id_edit_.attach(GetDlgItem(IDC_EDIT_FIXED_ID)->m_hWnd);
+
+ export_type_.SetCurSel(1);
+
+ return TRUE; // return TRUE unless you set the focus to a control
+}
+
+
+BEGIN_MESSAGE_MAP(CDlgOptJson, CDialogEx)
+ ON_WM_PASTE()
+ ON_CBN_SELCHANGE(IDC_COMBO_DATA_TYPE, &CDlgOptJson::OnCbnDataTypeSelchange)
+ ON_CBN_SELCHANGE(IDC_COMBO_RANGE, &CDlgOptJson::OnCbnRangeSelchange)
+ ON_CBN_SELCHANGE(IDC_COMBO_DEPEND, &CDlgOptJson::OnCbnDependSelchange)
+ ON_CBN_SELCHANGE(IDC_COMBO_PARENT, &CDlgOptJson::OnCbnParentSelchange)
+ ON_CBN_SELCHANGE(IDC_COMBO_LOGIC, &CDlgOptJson::OnCbnLogicSelchange)
+ ON_BN_CLICKED(IDC_BUTTON_MODIFY, &CDlgOptJson::OnBnClickedButtonModify)
+ ON_BN_CLICKED(IDC_BUTTON_ADD, &CDlgOptJson::OnBnClickedButtonAdd)
+ ON_NOTIFY(TVN_SELCHANGED, IDC_TREE2, &CDlgOptJson::OnTvnSelchangedTree2)
+ ON_NOTIFY(NM_RCLICK, IDC_TREE2, &CDlgOptJson::OnNMRClickTree2)
+ ON_NOTIFY(TVN_SELCHANGING, IDC_TREE2, &CDlgOptJson::OnTvnSelchangingTree2)
+ ON_COMMAND(ID_TREE_LOADFILE, &CDlgOptJson::OnTreeLoadfile)
+ ON_COMMAND(ID_TREE_LOADCLIPBOARD, &CDlgOptJson::OnTreeLoadclipboard)
+ ON_LBN_DBLCLK(IDC_LIST_DEPEND, &CDlgOptJson::OnLbnDblclkListDepend)
+ ON_BN_CLICKED(IDC_BUTTON_SET, &CDlgOptJson::OnBnClickedButtonSet)
+ ON_COMMAND(ID_TREE_DELITEM, &CDlgOptJson::OnTreeDelitem)
+ ON_BN_CLICKED(IDC_BUTTON_EXPORT, &CDlgOptJson::OnBnClickedButtonExport)
+ ON_COMMAND(ID_TREE_MODIFYALLFIELD, &CDlgOptJson::OnTreeModifyallfield)
+ ON_COMMAND(ID_SORT_NAME, &CDlgOptJson::OnSortName)
+ ON_COMMAND(ID_SORT_TITLE, &CDlgOptJson::OnSortTitle)
+ ON_COMMAND(ID_SORT_GROUP, &CDlgOptJson::OnSortGroup)
+ ON_COMMAND(ID_SORT_POSITION, &CDlgOptJson::OnSortPosition)
+END_MESSAGE_MAP()
+
+
+// CDlgOptJson message handlers
+void CDlgOptJson::OnCbnSelchange()
+{
+
+}
+void CDlgOptJson::OnCbnDataTypeSelchange()
+{
+ std::wstring val(get_item_text(IDC_COMBO_DATA_TYPE));
+
+ range_.EnableWindow();
+ if (val == L"bool")
+ {
+ range_.SetCurSel(range_.FindStringExact(-1, L"none"));
+ OnCbnRangeSelchange();
+ range_.EnableWindow(FALSE);
+ }
+}
+void CDlgOptJson::OnCbnRangeSelchange()
+{
+ std::wstring val(get_item_text(IDC_COMBO_RANGE)),
+ type(get_item_text(IDC_COMBO_DATA_TYPE));
+
+ GetDlgItem(IDC_BUTTON_SET)->EnableWindow(val != L"none");
+ if (val == L"list" || type == L"bool")
+ {
+ GetDlgItem(IDC_EDIT_DEFAULT)->ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_COMBO_DEFAULT)->ShowWindow(SW_SHOW);
+ def_val_.ResetContent();
+ if (type == L"bool")
+ {
+ def_val_.AddString(L"false");
+ def_val_.AddString(L"true");
+ def_val_.SetCurSel(0);
+ }
+ }
+ else
+ {
+ GetDlgItem(IDC_EDIT_DEFAULT)->ShowWindow(SW_SHOW);
+ GetDlgItem(IDC_COMBO_DEFAULT)->ShowWindow(SW_HIDE);
+ }
+}
+void CDlgOptJson::OnCbnDependSelchange()
+{
+ std::wstring val(get_item_text(IDC_COMBO_DEPEND));
+
+ parent_.EnableWindow(val != L"none");
+ logic_.EnableWindow(val != L"none");
+ depends_.EnableWindow(val != L"none");
+ lower_.EnableWindow(val != L"none");
+ upper_.EnableWindow(val != L"none");
+
+ GetDlgItem(IDC_BUTTON_ADD)->EnableWindow(val != L"none");
+ GetDlgItem(IDC_EDIT_LOW)->EnableWindow(val != L"none");
+ GetDlgItem(IDC_EDIT_BIG)->EnableWindow(val != L"none");
+
+ if (val != L"none")
+ {
+ val = get_item_text(IDC_EDIT_NAME);
+ parent_.ResetContent();
+ for (auto& v : opts_)
+ {
+ if (val == v.name)
+ continue;
+ parent_.AddString(v.title.c_str());
+ }
+ }
+}
+void CDlgOptJson::OnCbnParentSelchange()
+{
+ std::wstring val(get_item_text(IDC_COMBO_PARENT));
+ SANEOPT opt;
+
+ for (auto& v : opts_)
+ {
+ if (val == v.title)
+ {
+ opt = v;
+ break;
+ }
+ }
+
+ if (opt.type == L"bool")
+ {
+ logic_.ResetContent();
+ logic_.AddString(L"==");
+ logic_.SetCurSel(0);
+ OnCbnLogicSelchange();
+
+ GetDlgItem(IDC_EDIT_LOW)->ShowWindow(SW_HIDE);
+ lower_.ShowWindow(SW_SHOW);
+ lower_.ResetContent();
+ lower_.AddString(L"false");
+ lower_.AddString(L"true");
+ lower_.SetCurSel(0);
+ }
+ else if (opt.type == L"int" || opt.type == L"float")
+ {
+ logic_.ResetContent();
+ logic_.AddString(L"==");
+ logic_.AddString(L"!=");
+ logic_.AddString(L"<");
+ logic_.AddString(L"<=");
+ logic_.AddString(L">");
+ logic_.AddString(L">=");
+ logic_.AddString(L"between");
+ logic_.AddString(L"out of");
+ logic_.SetCurSel(0);
+ OnCbnLogicSelchange();
+
+ if (opt.range_type == L"list")
+ {
+ GetDlgItem(IDC_EDIT_LOW)->ShowWindow(SW_HIDE);
+ lower_.ShowWindow(SW_SHOW);
+ lower_.ResetContent();
+ upper_.ResetContent();
+
+ if (opt.type == L"int")
+ {
+ for (auto& v : opt.range)
+ {
+ std::wstring val(std::to_wstring(*(int*)v.c_str()));
+ lower_.AddString(val.c_str());
+ upper_.AddString(val.c_str());
+ }
+ }
+ else
+ {
+ for (auto& v : opt.range)
+ {
+ std::wstring val(std::to_wstring(*(double*)v.c_str()));
+ lower_.AddString(val.c_str());
+ upper_.AddString(val.c_str());
+ }
+ }
+ }
+ else
+ {
+ GetDlgItem(IDC_EDIT_LOW)->ShowWindow(SW_SHOW);
+ lower_.ShowWindow(SW_HIDE);
+ }
+ }
+ else if (opt.type == L"string")
+ {
+ logic_.ResetContent();
+ logic_.AddString(L"==");
+ logic_.AddString(L"!=");
+ logic_.SetCurSel(0);
+ OnCbnLogicSelchange();
+
+ if (opt.range_type == L"list")
+ {
+ GetDlgItem(IDC_EDIT_LOW)->ShowWindow(SW_HIDE);
+ lower_.ShowWindow(SW_SHOW);
+ lower_.ResetContent();
+ for (auto& v : opt.range)
+ {
+ std::wstring val((const wchar_t*)v.c_str());
+ lower_.AddString(val.c_str());
+ }
+ }
+ else
+ {
+ GetDlgItem(IDC_EDIT_LOW)->ShowWindow(SW_SHOW);
+ lower_.ShowWindow(SW_HIDE);
+ }
+ }
+}
+void CDlgOptJson::OnCbnLogicSelchange()
+{
+ std::wstring val(get_item_text(IDC_COMBO_LOGIC));
+
+ if (val == L"between" || val == L"out of")
+ {
+ GetDlgItem(IDC_STATIC_AND)->ShowWindow(SW_SHOW);
+ // upper_.ShowWindow(SW_SHOW);
+
+ val = get_item_text(IDC_COMBO_PARENT);
+ for (auto& v : opts_)
+ {
+ if (val == v.title)
+ {
+ val = v.range_type;
+ break;
+ }
+ }
+ if (val == L"list")
+ {
+ upper_.ShowWindow(SW_SHOW);
+ GetDlgItem(IDC_EDIT_BIG)->ShowWindow(SW_HIDE);
+ }
+ else
+ {
+ upper_.ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_EDIT_BIG)->ShowWindow(SW_SHOW);
+ }
+ }
+ else
+ {
+ GetDlgItem(IDC_STATIC_AND)->ShowWindow(SW_HIDE);
+ GetDlgItem(IDC_EDIT_BIG)->ShowWindow(SW_HIDE);
+ upper_.ShowWindow(SW_HIDE);
+ }
+}
+
+void CDlgOptJson::OnPaste()
+{
+ coding::CLPD clpb;
+
+ file_util::get_clipboard(coding::get_clipboard_content, &clpb);
+ if (clpb.cont.empty())
+ {
+ MessageBox(TEXT("clipboard is empty."));
+ return;
+ }
+
+ if (clpb.file)
+ {
+ size_t pos = clpb.cont.find(L"\r\n");
+ bool loaded = false;
+
+ while (!loaded && pos != std::wstring::npos)
+ {
+ loaded = load_from_file(clpb.cont.substr(0, pos).c_str());
+ clpb.cont.erase(0, pos + 2);
+ pos = clpb.cont.find(L"\r\n");
+ }
+ if (!loaded && file_util::is_file_existing(clpb.cont.c_str()))
+ load_from_file(clpb.cont.c_str());
+ }
+ else
+ {
+ std::wstring err(L"");
+ if (load_from_json_text(clpb.cont.c_str(), &err))
+ return;
+
+ // we assum the content from codes ...
+ std::wstring jsn(L"");
+ size_t pos = clpb.cont.find(L" std::string");
+
+ while (pos != std::wstring::npos)
+ {
+ clpb.cont.erase(0, pos);
+ pos = clpb.cont.find(L"\"");
+ if (pos == std::wstring::npos)
+ break;
+ clpb.cont.erase(0, pos + 1);
+ pos = clpb.cont.find(L"\");");
+ if (pos == std::wstring::npos)
+ {
+ jsn += clpb.cont;
+ break;
+ }
+ else
+ jsn += clpb.cont.substr(0, pos);
+ clpb.cont.erase(0, pos);
+ pos = clpb.cont.find(L" std::string");
+ }
+
+ if (jsn.length())
+ {
+ pos = jsn.find(L"\\\\");
+ while (pos != std::wstring::npos)
+ {
+ jsn.erase(pos++, 1);
+ pos = jsn.find(L"\\\\", pos);
+ }
+ pos = jsn.find(L"\\\"");
+ while (pos != std::wstring::npos)
+ {
+ jsn.erase(pos++, 1);
+ pos = jsn.find(L"\\\"", pos);
+ }
+
+ load_from_json_text(jsn.c_str());
+ }
+ else
+ ::MessageBoxW(m_hWnd, err.c_str(), L"Load Error", MB_OK);
+ }
+}
+
+
+
+void CDlgOptJson::OnBnClickedButtonModify()
+{
+ // TODO: ڴӿؼ֪ͨ
+ SANEOPT sop;
+
+ from_ui(sop);
+ if (sop.name.empty() || sop.title.empty())
+ {
+ MessageBox(TEXT("Name and Title must input!"));
+ return;
+ }
+
+ for (auto& v : opts_)
+ {
+ if (v.title == sop.title && v.name != sop.name)
+ {
+ if (::MessageBoxW(m_hWnd, (L"\u5DF2\u7ECF\u5B58\u5728\u540D\u4E3A\u201C" + v.title + L"\u201D\u7684\u914D\u7F6E\u9879\uFF01\uFF0C\u60F3\u4FEE\u6539Name\u5B57\u6BB5\u5417\uFF1F").c_str(), L"Error", MB_ICONSTOP | MB_YESNO) == IDYES)
+ {
+ sop.range = std::move(v.range);
+ v = std::move(sop);
+ }
+ return;
+ }
+ }
+
+ for (auto& v : opts_)
+ {
+ if (v.name == sop.name)
+ {
+ sop.range = std::move(v.range);
+ v = std::move(sop);
+ modify_tree_title(v.name.c_str(), v.title.c_str());
+ return;
+ }
+ }
+
+ insert_new_item(sop);
+}
+
+
+void CDlgOptJson::OnBnClickedButtonAdd()
+{
+ // TODO: ڴӿؼ֪ͨ - add depend items
+ std::wstring opt(get_item_text(IDC_COMBO_PARENT)),
+ logic(get_item_text(IDC_COMBO_LOGIC)),
+ l(L""), u(L"");
+ int ind = 0;
+
+ if (lower_.IsWindowVisible())
+ l = get_item_text(IDC_COMBO_LOW);
+ else
+ l = get_item_text(IDC_EDIT_LOW);
+
+ if (upper_.IsWindowVisible())
+ u = get_item_text(IDC_COMBO_BIG);
+ else if (GetDlgItem(IDC_EDIT_BIG)->IsWindowVisible())
+ u = get_item_text(IDC_EDIT_BIG);
+
+ if (logic == L"between")
+ {
+ opt += L"==[" + l + L"," + u + L"]";
+ }
+ else if (logic == L"out of")
+ {
+ opt += L"!=[" + l + L"," + u + L"]";
+ }
+ else
+ {
+ opt += logic + l;
+ }
+
+ ind = depends_.FindStringExact(-1, opt.c_str());
+ if (ind == -1)
+ {
+ ind = depends_.AddString(opt.c_str());
+ }
+ depends_.SetCurSel(ind);
+}
+
+
+void CDlgOptJson::OnTvnSelchangedTree2(NMHDR* pNMHDR, LRESULT* pResult)
+{
+ LPNMTREEVIEW pNMTreeView = reinterpret_cast(pNMHDR);
+ // TODO: ڴӿؼ֪ͨ
+ HTREEITEM item = tree_.GetSelectedItem();
+
+ if (item)
+ {
+ TVITEM tvi;
+
+ tvi.mask = TVIF_SELECTEDIMAGE;
+ tvi.iSelectedImage = 1;
+ tvi.hItem = item;
+ tree_.SetItem(&tvi);
+
+ wchar_t* name = (wchar_t*)tree_.GetItemData(item);
+ for (auto& v : opts_)
+ {
+ if (v.name == name)
+ {
+ to_ui(v);
+ break;
+ }
+ }
+ }
+
+ *pResult = 0;
+}
+
+
+void CDlgOptJson::OnNMRClickTree2(NMHDR* pNMHDR, LRESULT* pResult)
+{
+ // TODO: ڴӿؼ֪ͨ
+ *pResult = 0;
+
+ POINT pt = { 0 };
+ HTREEITEM hsel = tree_.GetSelectedItem();
+
+ tree_menu_.EnableMenuItem(ID_TREE_ADDGROUP, MF_DISABLED);
+ tree_menu_.EnableMenuItem(ID_TREE_ADDITEM, MF_DISABLED);
+ tree_menu_.EnableMenuItem(ID_TREE_ADDPRODUCT, MF_DISABLED);
+ tree_menu_.EnableMenuItem(ID_TREE_DELITEM, MF_DISABLED);
+ tree_menu_.EnableMenuItem(ID_TREE_RENAME, MF_DISABLED);
+
+ tree_menu_.EnableMenuItem(ID_TREE_TOOLTIPS, MF_DISABLED);
+ tree_menu_.EnableMenuItem(ID_TREE_EXPORTCHAR, MF_DISABLED);
+ tree_menu_.EnableMenuItem(ID_TREE_UNIFYSEQUENCE, MF_DISABLED);
+
+ if (hsel)
+ {
+ tree_menu_.EnableMenuItem(ID_TREE_DELITEM, MF_ENABLED);
+ }
+
+ GetCursorPos(&pt);
+ tree_menu_.GetSubMenu(0)->TrackPopupMenu(0, pt.x, pt.y, this);
+}
+
+
+void CDlgOptJson::OnTvnSelchangingTree2(NMHDR* pNMHDR, LRESULT* pResult)
+{
+ LPNMTREEVIEW pNMTreeView = reinterpret_cast(pNMHDR);
+ // TODO: ڴӿؼ֪ͨ
+ HTREEITEM hsel = tree_.GetSelectedItem();
+
+ if (hsel)
+ {
+
+ }
+
+ *pResult = 0;
+}
+
+
+void CDlgOptJson::OnTreeLoadfile()
+{
+ // TODO: ڴ
+ file_util::PATHFILE path = { 0 };
+
+ if (file_util::browser_file(m_hWnd, &path))
+ {
+ load_from_file(path.path);
+ }
+}
+
+
+void CDlgOptJson::OnTreeLoadclipboard()
+{
+ // TODO: ڴ
+ OnPaste();
+}
+
+
+void CDlgOptJson::OnLbnDblclkListDepend()
+{
+ // TODO: ڴӿؼ֪ͨ
+ int sel = depends_.GetCurSel();
+
+ if (sel >= 0 && sel < depends_.GetCount())
+ depends_.DeleteString(sel);
+}
+
+
+void CDlgOptJson::OnBnClickedButtonSet()
+{
+ // TODO: ڴӿؼ֪ͨ
+ std::wstring val(get_item_text(IDC_COMBO_RANGE));
+ CDlgRange dlg(val == L"list", this);
+ SANEOPT opt;
+
+ val = get_item_text(IDC_EDIT_NAME);
+ if (val.empty())
+ {
+ MessageBox(TEXT("ΨһƣNameֵֶ"));
+ GotoDlgCtrl(GetDlgItem(IDC_EDIT_NAME));
+ return;
+ }
+ opt.name = val;
+ for (auto& v : opts_)
+ {
+ if (v.name == val)
+ {
+ opt = v;
+ break;
+ }
+ }
+ val = get_item_text(IDC_COMBO_DATA_TYPE);
+ if (!opt.name.empty())
+ {
+ if (val == L"int")
+ {
+ dlg.init_ = std::to_wstring(*(int*)opt.def_val.c_str());
+ for (auto& v : opt.range)
+ dlg.vals_.push_back(std::to_wstring(*(int*)v.c_str()));
+ }
+ else if (val == L"float")
+ {
+ dlg.init_ = std::to_wstring(*(double*)opt.def_val.c_str());
+ for (auto& v : opt.range)
+ dlg.vals_.push_back(std::to_wstring(*(double*)v.c_str()));
+ }
+ else
+ {
+ dlg.init_ = (const wchar_t*)opt.def_val.c_str();
+ for (auto& v : opt.range)
+ dlg.vals_.push_back((const wchar_t*)v.c_str());
+ }
+ }
+
+ if (dlg.DoModal() == IDOK)
+ {
+ if (val == L"int")
+ {
+ int n = _wtoi(dlg.init_.c_str());
+ opt.def_val = std::string((char*)&n, sizeof(n));
+
+ opt.range.clear();
+ for (auto& v : dlg.vals_)
+ {
+ n = _wtoi(v.c_str());
+ opt.range.push_back(std::string((char*)&n, sizeof(n)));
+ }
+ }
+ else if (val == L"float")
+ {
+ double n = _wtof(dlg.init_.c_str());
+ opt.def_val = std::string((char*)&n, sizeof(n));
+
+ opt.range.clear();
+ for (auto& v : dlg.vals_)
+ {
+ n = _wtof(v.c_str());
+ opt.range.push_back(std::string((char*)&n, sizeof(n)));
+ }
+ }
+ else
+ {
+ opt.range.clear();
+ opt.def_val = std::string((const char*)dlg.init_.c_str(), dlg.init_.length() * 2 + 2);
+ for (auto& v : dlg.vals_)
+ opt.range.push_back(std::string((const char*)v.c_str(), v.length() * 2 + 2));
+ }
+
+ // add or insert ...
+ for (auto& v : opts_)
+ {
+ if (v.name == opt.name)
+ {
+ from_ui(v);
+ v.range = opt.range;
+ v.def_val = opt.def_val;
+ to_ui(v);
+ return;
+ }
+ }
+
+ SANEOPT so;
+
+ from_ui(so);
+ so.range = opt.range;
+ so.def_val = opt.def_val;
+ insert_new_item(so);
+ to_ui(so);
+ }
+}
+
+
+void CDlgOptJson::OnTreeDelitem()
+{
+ // TODO: ڴ
+ HTREEITEM item = tree_.GetSelectedItem();
+
+ if (item)
+ {
+ CString text(tree_.GetItemText(item));
+
+ if (MessageBox(TEXT("ȷҪɾ"), text.GetBuffer(), MB_YESNO) == IDYES)
+ {
+ wchar_t* buf = (wchar_t*)tree_.GetItemData(item);
+ tree_.DeleteItem(item);
+ if (buf)
+ {
+ for (int i = 0; i < opts_.size(); ++i)
+ {
+ if (opts_[i].name == buf)
+ {
+ opts_.erase(opts_.begin() + i);
+ break;
+ }
+ }
+ delete[] buf;
+ }
+ }
+ text.ReleaseBuffer();
+ }
+}
+
+
+void CDlgOptJson::OnBnClickedButtonExport()
+{
+ // TODO: ڴӿؼ֪ͨ
+ known_file_util::IJsonW* root = known_file_util::create_jsonW(), * child = NULL;
+
+ for (auto& v : opts_)
+ {
+ child = v.to_json();
+ if (child)
+ {
+ root->set_value(v.name.c_str(), child);
+ child->release();
+ }
+ }
+
+ std::wstring type(get_item_text(IDC_COMBO_EXPORT)),
+ cont(L"");
+
+ root->to_string(coding::get_wstring, &cont, type == L"\u683C\u5F0F\u6587\u672C" ? L"\t" : NULL);
+ root->release();
+ if (cont.empty())
+ {
+ MessageBox(TEXT("No content has been serialized! change exporting type and try again."), NULL, MB_OK | MB_ICONERROR);
+ return;
+ }
+
+ if (type == L"\u4EE3\u7801\u6587\u672C")
+ {
+ size_t pos = cont.find(L"\\");
+
+ while (pos++ != std::wstring::npos)
+ {
+ cont.insert(pos++, L"\\");
+ pos = cont.find(L"\\", pos);
+ }
+
+ pos = cont.find(L"\"");
+ while (pos != std::wstring::npos)
+ {
+ cont.insert(pos, L"\\");
+ pos = cont.find(L"\"", pos + 2);
+ }
+ }
+
+ int n = file_util::set_clipboard(cont.c_str(), cont.length() * 2, CF_UNICODETEXT);
+ MessageBox(TEXT("JSON text has set to clipboard already"), std::to_wstring(cont.length()).c_str());
+}
+
+
+void CDlgOptJson::OnTreeModifyallfield()
+{
+ // TODO: ڴ
+ // Group;Category;Affect;Version;Position;Readonly;Public;Enabled;Depends;
+ CDlgRange dlg(CDlgRange::TYPE_FIELDS, this);
+
+ auto init_val = [&](const wchar_t* field, CComboBox* box) -> void
+ {
+ std::wstring n(field);
+ wchar_t text[256] = { 0 };
+ int l = 0;
+
+ box->ResetContent();
+ box->EnableWindow(); // 0x50010302
+ // ::SetWindowLong(box->m_hWnd, GWL_STYLE, (LONG)0x50010302);
+ if (n == L"Group")
+ {
+ for (int i = 0; i < group_.GetCount(); ++i)
+ {
+ l = group_.GetLBText(i, text);
+ text[l] = 0;
+ box->AddString(text);
+ }
+ }
+ else if (n == L"Category")
+ {
+ for (int i = 0; i < cat_.GetCount(); ++i)
+ {
+ l = cat_.GetLBText(i, text);
+ text[l] = 0;
+ box->AddString(text);
+ }
+ }
+ else if (n == L"Depends")
+ {
+ box->AddString(L"none");
+ box->SetCurSel(0);
+ box->EnableWindow(FALSE);
+ }
+ else if (n == L"Affect")
+ {
+ for (int i = 0; i < affect_.GetCount(); ++i)
+ {
+ l = affect_.GetLBText(i, text);
+ text[l] = 0;
+ box->AddString(text);
+ }
+ }
+ else if (n == L"Version")
+ {
+ box->AddString(L"1");
+ box->SetCurSel(0);
+ }
+ else if (n == L"Position")
+ {
+ box->AddString(L"-1");
+ box->SetCurSel(0);
+ }
+ else if (n == L"Readonly")
+ {
+ box->AddString(L"false");
+ box->AddString(L"true");
+ //::SetWindowLong(box->m_hWnd, GWL_STYLE, (LONG)0x50010203);
+ }
+ else if (n == L"Public")
+ {
+ box->AddString(L"false");
+ box->AddString(L"true");
+ //::SetWindowLong(box->m_hWnd, GWL_STYLE, (LONG)0x50010203);
+ }
+ else if (n == L"Enabled")
+ {
+ box->AddString(L"false");
+ box->AddString(L"true");
+ //::SetWindowLong(box->m_hWnd, GWL_STYLE, (LONG)0x50010203);
+ }
+ };
+
+ dlg.set_init_val_api(init_val);
+ if (dlg.DoModal() == IDOK)
+ {
+ std::wstring n(dlg.vals_[0]),
+ val(dlg.init_);
+
+ if (n == L"Group")
+ {
+ for (auto& v : opts_)
+ v.group = val;
+ }
+ else if (n == L"Category")
+ {
+ for (auto& v : opts_)
+ v.category = val;
+ }
+ else if (n == L"Depends")
+ {
+ for (auto& v : opts_)
+ v.depend_oper = val;
+ }
+ else if (n == L"Affect")
+ {
+ for (auto& v : opts_)
+ v.affect = val;
+ }
+ else if (n == L"Version")
+ {
+ for (auto& v : opts_)
+ v.ver = _wtoi(val.c_str());
+ }
+ else if (n == L"Position")
+ {
+ for (auto& v : opts_)
+ v.pos = _wtoi(val.c_str());
+ }
+ else if (n == L"Readonly")
+ {
+ for (auto& v : opts_)
+ v.readonly = val == L"true";
+ }
+ else if (n == L"Public")
+ {
+ for (auto& v : opts_)
+ v.open = val == L"true";
+ }
+ else if (n == L"Enabled")
+ {
+ for (auto& v : opts_)
+ v.enable = val == L"true";
+ }
+
+ HTREEITEM sel = tree_.GetSelectedItem();
+ if (sel)
+ {
+ wchar_t* n = (wchar_t*)tree_.GetItemData(sel);
+ for (auto& v : opts_)
+ {
+ if (v.name == n)
+ {
+ to_ui(v);
+ break;
+ }
+ }
+ }
+ }
+}
+
+
+void CDlgOptJson::OnSortName()
+{
+ // TODO: ڴ
+ HTREEITEM sel = tree_.GetSelectedItem();
+ std::wstring name(L"");
+ std::vector all(std::move(opts_));
+
+ std::sort(all.begin(), all.end(), SANEOPT::compare_name);
+ if (sel)
+ {
+ wchar_t* n = (wchar_t*)tree_.GetItemData(sel);
+ if (n)
+ name = n;
+ }
+
+ delete_from_tree();
+ for (auto& v : all)
+ insert_new_item(v, v.name == name);
+}
+
+
+void CDlgOptJson::OnSortTitle()
+{
+ // TODO: ڴ
+ HTREEITEM sel = tree_.GetSelectedItem();
+ std::wstring name(L"");
+ std::vector all(std::move(opts_));
+
+ std::sort(all.begin(), all.end(), SANEOPT::compare_title);
+ if (sel)
+ {
+ wchar_t* n = (wchar_t*)tree_.GetItemData(sel);
+ if (n)
+ name = n;
+ }
+
+ delete_from_tree();
+ for (auto& v : all)
+ insert_new_item(v, v.name == name);
+}
+
+
+void CDlgOptJson::OnSortGroup()
+{
+ // TODO: ڴ
+ HTREEITEM sel = tree_.GetSelectedItem();
+ std::wstring name(L"");
+ std::vector all(std::move(opts_));
+
+ std::sort(all.begin(), all.end(), SANEOPT::compare_group);
+ if (sel)
+ {
+ wchar_t* n = (wchar_t*)tree_.GetItemData(sel);
+ if (n)
+ name = n;
+ }
+
+ delete_from_tree();
+ for (auto& v : all)
+ insert_new_item(v, v.name == name);
+}
+
+
+void CDlgOptJson::OnSortPosition()
+{
+ // TODO: ڴ
+ HTREEITEM sel = tree_.GetSelectedItem();
+ std::wstring name(L"");
+ std::vector all(std::move(opts_));
+
+ std::sort(all.begin(), all.end(), SANEOPT::compare_position);
+ if (sel)
+ {
+ wchar_t* n = (wchar_t*)tree_.GetItemData(sel);
+ if (n)
+ name = n;
+ }
+
+ delete_from_tree();
+ for (auto& v : all)
+ insert_new_item(v, v.name == name);
+}
diff --git a/tools/apps/hgjson/DlgOptJson.h b/tools/apps/hgjson/DlgOptJson.h
new file mode 100644
index 0000000..edb31a3
--- /dev/null
+++ b/tools/apps/hgjson/DlgOptJson.h
@@ -0,0 +1,203 @@
+#pragma once
+
+
+// CDlgInput dialog
+#include
+#include
+
+#include
+#include
+#include
+#include
+
+#include "hex_edit.h"
+
+namespace coding
+{
+ typedef struct _clp_d
+ {
+ bool file;
+ std::wstring cont;
+ }CLPD, * LPCLPD;
+
+ INTER_MODULE_CALLBACK(get_string);
+ INTER_MODULE_CALLBACK(get_wstring);
+ INTER_MODULE_CALLBACK(get_clipboard_content);
+ std::wstring name_from_depend_exp(const std::wstring& depend_exp);
+};
+
+// Group: ;ͼ;ֽʽ;;
+//
+// Cat: ͼ;
+//
+
+class CDlgOptJson : public CDialogEx
+{
+ DECLARE_DYNAMIC(CDlgOptJson)
+
+ CComboBox group_;
+ CComboBox cat_;
+ CComboBox affect_;
+ CComboBox unit_;
+ CComboBox type_;
+ CComboBox range_;
+ CComboBox def_val_;
+ CComboBox depend_;
+ CComboBox parent_;
+ CComboBox logic_;
+ CComboBox lower_;
+ CComboBox upper_;
+ CComboBox export_type_;
+ CListBox depends_;
+ CTreeCtrl tree_;
+ CMenu tree_menu_;
+ CImageList tree_img_;
+
+ hex_edit fix_id_edit_;
+
+ std::wstring get_item_text(UINT id);
+ bool is_button_check(UINT id);
+ void set_button_check(UINT id, bool check);
+
+public:
+ CDlgOptJson(CWnd* pParent = NULL); // standard constructor
+ virtual ~CDlgOptJson();
+
+// Dialog Data
+ enum { IDD = IDD_NEW_JSON };
+
+ typedef struct _sane_opt_json
+ {
+ std::wstring name;
+ std::wstring title;
+ std::wstring desc;
+ std::wstring group;
+ std::wstring category;
+ std::wstring affect;
+ std::wstring unit;
+ std::wstring type;
+ std::string def_val;
+ std::wstring range_type;
+ std::vector range;
+ std::wstring depend_oper;
+ std::vector depends;
+
+ int ver;
+ int pos;
+ int fix_id;
+ bool readonly;
+ bool open;
+ bool enable;
+
+ struct _sane_opt_json()
+ {
+ init(this);
+ }
+ struct _sane_opt_json(known_file_util::IJsonW* jsn)
+ {
+ if (!from_json(jsn))
+ {
+ init(this);
+ }
+ }
+ static void init(struct _sane_opt_json* opt)
+ {
+ opt->name = opt->title = opt->desc = L"";
+ opt->group = L"\u57FA\u672C\u8BBE\u7F6E";
+ opt->category = opt->unit = opt->affect = opt->depend_oper = opt->range_type = L"none";
+ opt->range.clear();
+ opt->depends.clear();
+
+ opt->def_val = "";
+ opt->type = L"int";
+ opt->ver = 1;
+ opt->fix_id = 0;
+ opt->pos = -1;
+ opt->readonly = false;
+ opt->open = true;
+ opt->enable = true;
+ }
+ static void affect_str(int& val, std::wstring& str, bool to_str)
+ {
+ static std::wstring affect_desc[] = { L"none", L"", L"ͼ", L"+" };
+
+ if (to_str)
+ {
+ int ind = val >> 1;
+ if (ind >= 0 && ind < _countof(affect_desc))
+ str = affect_desc[ind];
+ else
+ str = affect_desc[0];
+ }
+ else
+ {
+ val = 0;
+ for (int i = 0; i < _countof(affect_desc); ++i)
+ {
+ if (str == affect_desc[i])
+ val = i << 1;
+ }
+ }
+ }
+
+ static bool compare_name(const struct _sane_opt_json& l, const struct _sane_opt_json& r)
+ {
+ return l.name < r.name;
+ }
+ static bool compare_title(const struct _sane_opt_json& l, const struct _sane_opt_json& r)
+ {
+ return l.title < r.title;
+ }
+ static bool compare_group(const struct _sane_opt_json& l, const struct _sane_opt_json& r)
+ {
+ return l.group < r.group;
+ }
+ static bool compare_position(const struct _sane_opt_json& l, const struct _sane_opt_json& r)
+ {
+ return l.pos < r.pos;
+ }
+
+ known_file_util::IJsonW* to_json(void);
+ bool from_json(known_file_util::IJsonW* jsn);
+ }SANEOPT;
+ std::vector opts_;
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
+ virtual BOOL OnInitDialog();
+
+ void from_ui(SANEOPT& sop);
+ void to_ui(const SANEOPT& sop);
+ HTREEITEM insert_new_item(const SANEOPT& opt, bool sel = true);
+ void delete_from_tree(const wchar_t* name = NULL);
+ HTREEITEM modify_tree_title(const wchar_t* name, const wchar_t* title);
+
+ bool load_from_file(const wchar_t* path_file);
+ bool load_from_json_text(const wchar_t* txt, std::wstring* err_msg = NULL);
+
+ DECLARE_MESSAGE_MAP()
+public:
+ afx_msg void OnCbnDataTypeSelchange();
+ afx_msg void OnCbnRangeSelchange();
+ afx_msg void OnCbnDependSelchange();
+ afx_msg void OnCbnParentSelchange();
+ afx_msg void OnCbnLogicSelchange();
+ afx_msg void OnCbnSelchange();
+ afx_msg void OnPaste();
+ afx_msg void OnBnClickedButtonModify();
+ afx_msg void OnBnClickedButtonAdd();
+ afx_msg void OnTvnSelchangedTree2(NMHDR* pNMHDR, LRESULT* pResult);
+ afx_msg void OnNMRClickTree2(NMHDR* pNMHDR, LRESULT* pResult);
+ afx_msg void OnTvnSelchangingTree2(NMHDR* pNMHDR, LRESULT* pResult);
+ afx_msg void OnTreeLoadfile();
+ afx_msg void OnTreeLoadclipboard();
+ afx_msg void OnLbnDblclkListDepend();
+ afx_msg void OnBnClickedButtonSet();
+ afx_msg void OnTreeDelitem();
+ afx_msg void OnBnClickedButtonExport();
+ afx_msg void OnTreeModifyallfield();
+ afx_msg void OnSortName();
+ afx_msg void OnSortTitle();
+ afx_msg void OnSortGroup();
+ afx_msg void OnSortPosition();
+};
diff --git a/tools/apps/hgjson/DlgRange.cpp b/tools/apps/hgjson/DlgRange.cpp
new file mode 100644
index 0000000..72ba2c0
--- /dev/null
+++ b/tools/apps/hgjson/DlgRange.cpp
@@ -0,0 +1,263 @@
+// DlgRange.cpp: 实现文件
+//
+
+#include "stdafx.h"
+#include "hgjson.h"
+#include "DlgRange.h"
+#include "afxdialogex.h"
+
+#include "resource.h"
+
+// CDlgRange 对话框
+
+IMPLEMENT_DYNAMIC(CDlgRange, CDialogEx)
+
+CDlgRange::CDlgRange(int type, CWnd* pParent /*=nullptr*/)
+ : CDialogEx(IDD_RANGE, pParent)
+ , type_(type)
+{
+
+}
+
+CDlgRange::~CDlgRange()
+{
+}
+
+std::wstring CDlgRange::get_item_text(UINT id)
+{
+ int l = GetDlgItem(id)->GetWindowTextLengthW();
+ wchar_t* buf = new wchar_t[l + 4];
+
+ l = GetDlgItem(id)->GetWindowTextW(buf, l + 2);
+ buf[l] = 0;
+
+ std::wstring ret(buf);
+
+ delete[] buf;
+
+ return std::move(ret);
+}
+
+void CDlgRange::DoDataExchange(CDataExchange* pDX)
+{
+ CDialogEx::DoDataExchange(pDX);
+ DDX_Control(pDX, IDC_LIST1, list_);
+ DDX_Control(pDX, IDC_COMBO_VAL, val_);
+}
+
+BOOL CDlgRange::OnInitDialog()
+{
+ CDialogEx::OnInitDialog();
+
+ // Set the icon for this dialog. The framework does this automatically
+ // when the application's main window is not a dialog
+ list_.SetExtendedStyle(list_.GetExtendedStyle() | LVS_EX_FULLROWSELECT | LVS_EX_GRIDLINES | LVS_EX_INFOTIP);
+ list_.InsertColumn(0, TEXT("Value lists"), 0, 177);
+ list_.InsertColumn(1, TEXT("Default"), 0, 48);
+
+ GetDlgItem(IDC_EDIT_VAL)->EnableWindow(type_ == TYPE_LIST);
+ list_.EnableWindow(type_ == TYPE_LIST);
+ GetDlgItem(IDC_BUTTON_ADD)->EnableWindow(type_ == TYPE_LIST);
+
+ GetDlgItem(IDC_EDIT_FROM)->EnableWindow(type_ == TYPE_RANGE);
+ GetDlgItem(IDC_EDIT_TO)->EnableWindow(type_ == TYPE_RANGE);
+ GetDlgItem(IDC_EDIT_STEP)->EnableWindow(type_ == TYPE_RANGE);
+ GetDlgItem(IDC_EDIT_INIT2)->EnableWindow(type_ == TYPE_RANGE);
+
+ GetDlgItem(IDC_COMBO_FIELD)->EnableWindow(type_ == TYPE_FIELDS);
+ val_.EnableWindow(type_ == TYPE_FIELDS);
+
+ if (type_ == TYPE_LIST)
+ {
+ for (auto& v: vals_)
+ {
+ int ind = list_.InsertItem(list_.GetItemCount(), v.c_str());
+ if (v == init_)
+ list_.SetItemText(ind, 1, L"yes");
+ }
+ }
+ else if(type_ == TYPE_RANGE && vals_.size() == 3)
+ {
+ SetDlgItemTextW(IDC_EDIT_FROM, vals_[0].c_str());
+ SetDlgItemTextW(IDC_EDIT_TO, vals_[1].c_str());
+ SetDlgItemTextW(IDC_EDIT_STEP, vals_[2].c_str());
+
+ SetDlgItemTextW(IDC_EDIT_INIT2, init_.c_str());
+ }
+ else if (type_ == TYPE_FIELDS)
+ {
+
+ }
+
+ return TRUE; // return TRUE unless you set the focus to a control
+}
+
+BEGIN_MESSAGE_MAP(CDlgRange, CDialogEx)
+ ON_BN_CLICKED(IDC_BUTTON_ADD, &CDlgRange::OnBnClickedButton1)
+ ON_BN_CLICKED(IDOK, &CDlgRange::OnBnClickedOk)
+ ON_NOTIFY(NM_DBLCLK, IDC_LIST1, &CDlgRange::OnNMDblclkList1)
+ ON_CBN_SELCHANGE(IDC_COMBO_FIELD, &CDlgRange::OnCbnSelchangeComboField)
+END_MESSAGE_MAP()
+
+
+// CDlgRange 消息处理程序
+
+
+void CDlgRange::OnBnClickedButton1()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ std::wstring val(get_item_text(IDC_EDIT_VAL));
+ int ind = -1;
+
+ if (val.empty())
+ {
+ MessageBox(TEXT("NO Input!"));
+ return;
+ }
+ for (int i = 0; i < list_.GetItemCount(); ++i)
+ {
+ wchar_t buf[25] = { 0 };
+ list_.GetItemText(i, 0, buf, _countof(buf) - 1);
+ if (val == buf)
+ {
+ list_.SetItemState(i, LVIS_FOCUSED | LVIS_SELECTED | LVIS_ACTIVATING, LVIS_FOCUSED | LVIS_SELECTED | LVIS_ACTIVATING);
+ list_.SetSelectionMark(i);
+ ind = i;
+ break;
+ }
+ }
+
+ if(ind == -1)
+ ind = list_.InsertItem(list_.GetItemCount(), val.c_str());
+
+ list_.SetItemState(ind, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED);
+ list_.SetSelectionMark(ind);
+ list_.EnsureVisible(ind, FALSE);
+}
+
+
+void CDlgRange::OnBnClickedOk()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ vals_.clear();
+ if (type_ == TYPE_LIST)
+ {
+ if (init_.empty())
+ {
+ MessageBox(TEXT("请确定默认值!双击列表中的某项进行选择。 "), TEXT("No Default"), MB_OK);
+ return;
+ }
+ if(list_.GetItemCount() == 0)
+ {
+ MessageBox(TEXT("没有输入有效的值列表"), TEXT("No Value"), MB_OK);
+ return;
+ }
+
+ for (int i = 0; i < list_.GetItemCount(); ++i)
+ {
+ wchar_t buf[256] = { 0 };
+ list_.GetItemText(i, 0, buf, _countof(buf) - 1);
+ vals_.push_back(buf);
+ }
+ }
+ else if(type_ == TYPE_RANGE)
+ {
+ std::wstring val(get_item_text(IDC_EDIT_FROM));
+
+ if (val.empty())
+ {
+ MessageBox(TEXT("没有输入有效初始值"), TEXT("No Value"), MB_OK);
+ GotoDlgCtrl(GetDlgItem(IDC_EDIT_FROM));
+ return;
+ }
+ vals_.push_back(val);
+
+ val = get_item_text(IDC_EDIT_TO);
+ if (val.empty())
+ {
+ MessageBox(TEXT("没有输入有效终止值"), TEXT("No Value"), MB_OK);
+ GotoDlgCtrl(GetDlgItem(IDC_EDIT_TO));
+ return;
+ }
+ vals_.push_back(val);
+
+ val = get_item_text(IDC_EDIT_STEP);
+ if (val.empty())
+ {
+ MessageBox(TEXT("没有输入有效步长值"), TEXT("No Value"), MB_OK);
+ GotoDlgCtrl(GetDlgItem(IDC_EDIT_TO));
+ return;
+ }
+ vals_.push_back(val);
+
+ init_ = get_item_text(IDC_EDIT_INIT2);
+ if (init_.empty())
+ {
+ MessageBox(TEXT("没有输入有效默认值"), TEXT("No Value"), MB_OK);
+ GotoDlgCtrl(GetDlgItem(IDC_EDIT_INIT2));
+ return;
+ }
+ }
+ else if (type_ == TYPE_FIELDS)
+ {
+ std::wstring field(get_item_text(IDC_COMBO_FIELD));
+
+ vals_.clear();
+ vals_.push_back(field);
+
+ init_ = get_item_text(IDC_COMBO_VAL);
+ if (init_.empty())
+ {
+ MessageBox(TEXT("没有输入有效值"), TEXT("No Value"), MB_OK);
+ GotoDlgCtrl(GetDlgItem(IDC_COMBO_VAL));
+ return;
+ }
+ }
+
+ CDialogEx::OnOK();
+}
+
+
+void CDlgRange::OnNMDblclkList1(NMHDR* pNMHDR, LRESULT* pResult)
+{
+ LPNMITEMACTIVATE pNMItemActivate = reinterpret_cast(pNMHDR);
+ // TODO: 在此添加控件通知处理程序代码
+ *pResult = 0;
+
+
+ POINT pos = { 0 };
+ int item = -1;
+
+ GetCursorPos(&pos);
+ list_.ScreenToClient(&pos);
+ item = list_.HitTest(pos);
+ if (item != -1)
+ {
+ wchar_t buf[256] = { 0 };
+ int ret = 0;
+
+ list_.GetItemText(item, 0, buf, _countof(buf) - 1);
+ ret = ::MessageBoxW(m_hWnd, L"是否将该项设置为默认值?\r\nYes: 是\r\nNo: 删除该项\r\nCancel: 放弃操作", buf, MB_YESNOCANCEL);
+ if (ret == IDYES)
+ {
+ init_ = buf;
+ for (int i = 0; i < list_.GetItemCount(); ++i)
+ {
+ list_.SetItemText(i, 1, i == item ? L"yes" : L"");
+ }
+ }
+ else if (ret == IDNO)
+ {
+ list_.DeleteItem(item);
+ }
+ }
+}
+
+
+void CDlgRange::OnCbnSelchangeComboField()
+{
+ // TODO: 在此添加控件通知处理程序代码
+ std::wstring field(get_item_text(IDC_COMBO_FIELD));
+
+ init_val_api_(field.c_str(), &val_);
+}
diff --git a/tools/apps/hgjson/DlgRange.h b/tools/apps/hgjson/DlgRange.h
new file mode 100644
index 0000000..4381bbf
--- /dev/null
+++ b/tools/apps/hgjson/DlgRange.h
@@ -0,0 +1,52 @@
+#pragma once
+
+
+// CDlgRange 对话框
+#include
+#include
+#include
+
+#define INIT_VAL_API_PROTO std::function
+
+class CDlgRange : public CDialogEx
+{
+ DECLARE_DYNAMIC(CDlgRange)
+
+ INIT_VAL_API_PROTO init_val_api_;
+
+ std::wstring get_item_text(UINT id);
+
+public:
+ CDlgRange(int type, CWnd* pParent = nullptr); // 标准构造函数
+ virtual ~CDlgRange();
+
+// 对话框数据
+#ifdef AFX_DESIGN_TIME
+ enum { IDD = IDD_RANGE };
+#endif
+
+protected:
+ virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV 支持
+ virtual BOOL OnInitDialog();
+
+ DECLARE_MESSAGE_MAP()
+public:
+
+ std::vector vals_;
+ std::wstring init_;
+
+ enum {TYPE_RANGE, TYPE_LIST, TYPE_FIELDS};
+ int type_; // 0 - range; 1 - list; 2 - modify fields
+
+ void set_init_val_api(INIT_VAL_API_PROTO api)
+ {
+ init_val_api_ = api;
+ }
+
+ afx_msg void OnBnClickedButton1();
+ CListCtrl list_;
+ afx_msg void OnBnClickedOk();
+ afx_msg void OnNMDblclkList1(NMHDR* pNMHDR, LRESULT* pResult);
+ CComboBox val_;
+ afx_msg void OnCbnSelchangeComboField();
+};
diff --git a/tools/apps/hgjson/hex_edit.cpp b/tools/apps/hgjson/hex_edit.cpp
new file mode 100644
index 0000000..3148721
--- /dev/null
+++ b/tools/apps/hgjson/hex_edit.cpp
@@ -0,0 +1,180 @@
+
+// hex_edit.cpp : Defines the class behaviors for the application.
+//
+
+#include "stdafx.h"
+#include "hex_edit.h"
+#include
+
+#ifdef _DEBUG
+#define new DEBUG_NEW
+#endif
+
+
+// hex_edit
+std::wstring hex_edit::fn_prop_key = L"hex-edit-proc";
+std::wstring hex_edit::obj_prop_key = L"hex-edit-object";
+const wchar_t* hex_edit::hex_z = L"£ãģţ";
+const wchar_t* hex_edit::hex_e = L"0123456789ABCDEF";
+
+hex_edit::hex_edit() : hwnd_(NULL), hz_(false)
+{}
+hex_edit::~hex_edit()
+{
+ clear();
+}
+
+LRESULT __stdcall hex_edit::hex_edit_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp)
+{
+ wchar_t now[40] = { 0 };
+ int len = 0, sel = 0, max_len = 4;
+ bool all_digit = true;
+ WNDPROC wndproc = (WNDPROC)GetPropW(hwnd, hex_edit::fn_prop_key.c_str());
+ hex_edit* obj = (hex_edit*)GetPropW(hwnd, hex_edit::obj_prop_key.c_str());
+ std::wstring buf(L"");
+ const wchar_t* hex = obj->hz_ ? hex_edit::hex_z : hex_edit::hex_e;
+
+ if (!wndproc)
+ wndproc = DefWindowProcW;
+
+ switch (msg)
+ {
+ case WM_CHAR:
+ GetWindowTextW(hwnd, now, _countof(now));
+ len = lstrlenW(now);
+ sel = SendMessage(hwnd, EM_GETSEL, 0, 0);
+ sel = ((sel >> 16) & 0x0ff) - (sel & 0x0ffff);
+ if (wp >= ' ' && len - sel >= max_len)
+ return 0;
+ if (wp >= '0' && wp <= '9')
+ wp = hex[wp - '0'];
+ else if (wp >= 'A' && wp <= 'F')
+ wp = hex[wp - 'A' + 10];
+ else if (wp >= 'a' && wp <= 'f')
+ wp = hex[wp - 'a' + 10];
+ else if (wp >= ' ')
+ return 0;
+ break;
+ case WM_COPY:
+ return 0;
+ case WM_PASTE:
+ {
+ size_t l = 0;
+ if (file_util::get_clipboard(NULL, &l, CF_UNICODETEXT) == ERROR_INSUFFICIENT_BUFFER)
+ {
+ buf.resize(l + 4);
+ l++;
+ if (file_util::get_clipboard(&buf[0], &l, CF_UNICODETEXT))
+ l = 0;
+ }
+ if (l == 0)
+ return 0;
+ lp = (LPARAM)&buf[0];
+ msg = WM_SETTEXT;
+ }
+ case WM_SETTEXT:
+ for (int i = 0; len < max_len + 1 && i < lstrlenW((wchar_t*)lp); ++i)
+ {
+ wchar_t ch = ((wchar_t*)lp)[i];
+ if (ch >= '0' && ch <= '9')
+ now[len++] = hex[ch - '0'];
+ else if (ch >= 'A' && ch <= 'F')
+ {
+ now[len++] = hex[ch - 'A' + 10];
+ all_digit = false;
+ }
+ else if (ch >= 'a' && ch <= 'f')
+ {
+ now[len++] = hex[ch - 'a' + 10];
+ all_digit = false;
+ }
+ else
+ break;
+ }
+ if (len == 0)
+ return 0;
+ if (/*len == max_len + 1 &&*/ all_digit)
+ {
+ sel = _wtoi(now);
+ //if (sel <= 0x0ffff)
+ {
+ now[max_len] = 0;
+ for (int l = max_len - 1; l >= 0; --l, sel >>= 4)
+ now[l] = hex[sel % 16];
+ }
+ //else
+ // now[max_len] = 0;
+ }
+ lp = (LPARAM)now;
+ break;
+ }
+
+ return wndproc(hwnd, msg, wp, lp);
+}
+
+HWND hex_edit::attach(HWND hwnd)
+{
+ HWND old = hwnd_;
+
+ clear();
+ hwnd_ = hwnd;
+ if (IsWindow(hwnd_))
+ {
+ WNDPROC proc = (WNDPROC)GetWindowLong(hwnd_, GWL_WNDPROC);
+ SetPropW(hwnd_, hex_edit::obj_prop_key.c_str(), (HANDLE)this);
+ SetPropW(hwnd_, hex_edit::fn_prop_key.c_str(), (HANDLE)proc);
+ SetWindowLong(hwnd_, GWL_WNDPROC, (LONG)(FARPROC)hex_edit::hex_edit_proc);
+ }
+
+ return old;
+}
+void hex_edit::clear(void)
+{
+ if (IsWindow(hwnd_))
+ {
+ WNDPROC proc = (WNDPROC)GetPropW(hwnd_, hex_edit::fn_prop_key.c_str());
+ SetWindowLong(hwnd_, GWL_WNDPROC, (LONG)(FARPROC)proc);
+ SetPropW(hwnd_, hex_edit::obj_prop_key.c_str(), NULL);
+ SetPropW(hwnd_, hex_edit::fn_prop_key.c_str(), NULL);
+ }
+ hwnd_ = NULL;
+}
+unsigned hex_edit::value(void)
+{
+ unsigned v = 0;
+
+ if (IsWindow(hwnd_))
+ {
+ wchar_t buf[20] = { 0 };
+ GetWindowTextW(hwnd_, buf, _countof(buf) - 1);
+ for (int i = 0; i < _countof(buf) && buf[i]; ++i)
+ {
+ if (buf[i] >= L'0' && buf[i] <= L'9')
+ {
+ v <<= 4;
+ v += buf[i] - L'0';
+ }
+ else if (buf[i] >= L'A' && buf[i] <= L'F')
+ {
+ v <<= 4;
+ v += buf[i] - L'A' + 10;
+ }
+ else if (buf[i] >= L'a' && buf[i] <= L'f')
+ {
+ v <<= 4;
+ v += buf[i] - L'a' + 10;
+ }
+ else
+ break;
+ }
+ }
+
+ return v;
+}
+void hex_edit::set_value(unsigned v)
+{
+ if (IsWindow(hwnd_))
+ {
+ SetWindowTextW(hwnd_, std::to_wstring(v).c_str());
+ }
+}
\ No newline at end of file
diff --git a/tools/apps/hgjson/hex_edit.h b/tools/apps/hgjson/hex_edit.h
new file mode 100644
index 0000000..8a1d7f8
--- /dev/null
+++ b/tools/apps/hgjson/hex_edit.h
@@ -0,0 +1,30 @@
+
+// hex_edit.h : hex edit
+//
+
+#pragma once
+
+#include
+#include
+
+class hex_edit
+{
+ HWND hwnd_;
+ bool hz_;
+
+ static std::wstring fn_prop_key;
+ static std::wstring obj_prop_key;
+ static const wchar_t* hex_z;
+ static const wchar_t* hex_e;
+ static LRESULT __stdcall hex_edit_proc(HWND hwnd, UINT msg, WPARAM wp, LPARAM lp);
+
+public:
+ hex_edit();
+ ~hex_edit();
+
+public:
+ HWND attach(HWND hwnd);
+ void clear(void);
+ unsigned value(void);
+ void set_value(unsigned v);
+};
diff --git a/tools/apps/hgjson/hgjson.rc b/tools/apps/hgjson/hgjson.rc
index 82ec171..40c7dfe 100644
Binary files a/tools/apps/hgjson/hgjson.rc and b/tools/apps/hgjson/hgjson.rc differ
diff --git a/tools/apps/hgjson/hgjson.vcxproj b/tools/apps/hgjson/hgjson.vcxproj
index d0064e4..a2154d5 100644
--- a/tools/apps/hgjson/hgjson.vcxproj
+++ b/tools/apps/hgjson/hgjson.vcxproj
@@ -90,12 +90,15 @@
WIN32;_WINDOWS;NDEBUG;%(PreprocessorDefinitions)
true
4996
+ MultiThreadedDLL
Windows
true
true
true
+
+
false
@@ -117,7 +120,10 @@
+
+
+
@@ -133,7 +139,10 @@
+
+
+
diff --git a/tools/apps/hgjson/hgjson.vcxproj.filters b/tools/apps/hgjson/hgjson.vcxproj.filters
index 0e61248..6cf8b22 100644
--- a/tools/apps/hgjson/hgjson.vcxproj.filters
+++ b/tools/apps/hgjson/hgjson.vcxproj.filters
@@ -51,6 +51,15 @@
Header Files
+
+ Header Files
+
+
+ Header Files
+
+
+ Header Files
+
@@ -80,6 +89,15 @@
Source Files
+
+ Source Files
+
+
+ Source Files
+
+
+ Source Files
+
diff --git a/tools/apps/hgjson/hgjsonDlg.cpp b/tools/apps/hgjson/hgjsonDlg.cpp
index 0934cf2..ea0ebba 100644
--- a/tools/apps/hgjson/hgjsonDlg.cpp
+++ b/tools/apps/hgjson/hgjsonDlg.cpp
@@ -121,6 +121,30 @@ namespace coding
return inter_module_data::SET_RESULT_STOP;
}
+ std::wstring name_from_depend_exp(const std::wstring& depend_exp)
+ {
+ std::wstring name(L"");
+ size_t pos = depend_exp.find(L"!");
+
+ if (pos == std::wstring::npos)
+ {
+ pos = depend_exp.find(L"<");
+ if (pos == std::wstring::npos)
+ {
+ pos = depend_exp.find(L">");
+ if (pos == std::wstring::npos)
+ {
+ pos = depend_exp.find(L"=");
+ }
+ }
+ }
+ if (pos != std::wstring::npos)
+ {
+ name = depend_exp.substr(0, pos);
+ }
+
+ return std::move(name);
+ }
int string_need_bytes(const wchar_t* str)
{
@@ -165,6 +189,33 @@ namespace coding
return u;
}
+
+ // Base;Light;ImageProcess;Feeder;
+ static const wchar_t* group_name_[] = {L"none", L"base", L"light", L"imgproc", L"feeder"};
+ const wchar_t* group_name(int ind)
+ {
+ if (ind >= 0 && ind < _countof(group_name_))
+ return group_name_[ind];
+ else
+ return group_name_[0];
+ }
+ int group_index(const wchar_t* name)
+ {
+ for (int i = 0; i < _countof(group_name_); ++i)
+ {
+ if (wcsicmp(name, group_name_[i]) == 0)
+ return i;
+ }
+
+ const wchar_t* hz_grp[] = { L"\u57FA\u672C\u8BBE\u7F6E", L"\u4EAE\u5EA6", L"\u56FE\u50CF\u5904\u7406", L"\u9001\u7EB8\u65B9\u5F0F\u8BBE\u7F6E" };
+ for (int i = 0; i < _countof(hz_grp); ++i)
+ {
+ if (wcsicmp(name, hz_grp[i]) == 0)
+ return i + 1;
+ }
+
+ return 0;
+ }
}
namespace hz_2_py
@@ -5991,6 +6042,8 @@ void ChgjsonDlg::DoDataExchange(CDataExchange* pDX)
DDX_Control(pDX, IDC_COMBO_DEFAULT, combo_default_);
DDX_Control(pDX, IDC_COMBO5, field_);
DDX_Control(pDX, IDC_COMBO6, unit_);
+ DDX_Control(pDX, IDC_COMBO7, group_);
+ DDX_Control(pDX, IDC_COMBO8, affect_);
}
BEGIN_MESSAGE_MAP(ChgjsonDlg, CDialogEx)
@@ -6373,12 +6426,14 @@ void ChgjsonDlg::set_control_status(const HGITEM& item)
((CButton*)GetDlgItem(IDC_CHECK_ADVANCED))->SetCheck(item.advanced ? BST_CHECKED : BST_UNCHECKED);
((CButton*)GetDlgItem(IDC_CHECK_READONLY))->SetCheck(item.readonly ? BST_CHECKED : BST_UNCHECKED);
- ((CButton*)GetDlgItem(IDC_CHECK_DEVICEONLY))->SetCheck(item.deviceonly ? BST_CHECKED : BST_UNCHECKED);
+ //((CButton*)GetDlgItem(IDC_CHECK_DEVICEONLY))->SetCheck(item.deviceonly ? BST_CHECKED : BST_UNCHECKED);
((CButton*)GetDlgItem(IDC_CHECK_VISIBLE))->SetCheck(item.visible ? BST_CHECKED : BST_UNCHECKED);
SetDlgItemInt(IDC_EDIT_POS, item.position);
field_.SetCurSel(item.field);
unit_.SetCurSel(item.unit);
+ group_.SetCurSel(coding::group_index(item.group.c_str()));
+ affect_.SetCurSel(item.affect >> 1);
// value ...
GetDlgItem(IDC_STATIC_FROM)->ShowWindow(SW_HIDE);
@@ -6495,10 +6550,11 @@ void* ChgjsonDlg::create_json(int item, std::vector* def_h, std::wstring*
int prefer_size = 0;
const char* opt_name = title_to_name(hg_items_[item].title);
- jsn->set_value(L"category", hg_items_[item].advanced ? L"advanced" : L"base");
+ jsn->set_value(L"cat", hg_items_[item].advanced ? L"advanced" : L"base");
jsn->set_value(L"readonly", hg_items_[item].readonly);
- jsn->set_value(L"affect-img", hg_items_[item].affect_img_param);
- jsn->set_value(L"hwonly", hg_items_[item].deviceonly);
+ jsn->set_value(L"affect", hg_items_[item].affect);
+ //jsn->set_value(L"hwonly", hg_items_[item].deviceonly);
+ jsn->set_value(L"group", hg_items_[item].group.c_str());
jsn->set_value(L"visible", hg_items_[item].visible);
jsn->set_value(L"field", field_name(hg_items_[item].field));
jsn->set_value(L"pos", hg_items_[item].position);
@@ -6637,7 +6693,7 @@ std::string ChgjsonDlg::to_json_text(bool for_const, std::wstring* dev)
{
known_file_util::IJsonW* jsn = known_file_util::create_jsonW(), * item = NULL, *glb = known_file_util::create_jsonW();
HTREEITEM root = tree_.GetRootItem(), child = NULL;
- std::wstring val(get_tree_item_text(&tree_, root));
+ std::wstring val(get_tree_item_text(&tree_, root)), grpname(L"");
int count = 1, group = 1, ind = 0;
wchar_t buf[128] = { 0 };
@@ -6669,6 +6725,7 @@ std::string ChgjsonDlg::to_json_text(bool for_const, std::wstring* dev)
std::wstring key(L"");
hg_items_[ind].index = count++;
item = (known_file_util::IJsonW*)create_json(ind, &header, &key);
+ //item->set_value(L"group", grpname.c_str());
// swprintf_s(buf, _countof(buf) - 1, L"%d", hg_items_[ind].index);
jsn->set_value(key.c_str(), item);
item->release();
@@ -6679,8 +6736,9 @@ std::string ChgjsonDlg::to_json_text(bool for_const, std::wstring* dev)
{
val = get_tree_item_text(&tree_, root);
item = known_file_util::create_jsonW();
- item->set_value(L"category", L"base");
+ item->set_value(L"cat", L"base");
swprintf_s(buf, _countof(buf) - 1, L"grp-%d", group++);
+ grpname = buf;
// item->set_value(L"name", buf);
item->set_value(L"title", val.c_str());
item->set_value(L"type", L"group");
@@ -6698,10 +6756,11 @@ std::string ChgjsonDlg::to_json_text(bool for_const, std::wstring* dev)
hg_items_[ind].index = count++;
if (item)
{
- item->set_value(L"category", hg_items_[ind].advanced ? L"advanced" : L"base");
+ item->set_value(L"cat", hg_items_[ind].advanced ? L"advanced" : L"base");
item->set_value(L"readonly", hg_items_[ind].readonly);
- item->set_value(L"affect-img", hg_items_[ind].affect_img_param);
- item->set_value(L"hwonly", hg_items_[ind].deviceonly);
+ item->set_value(L"affect", hg_items_[ind].affect);
+ //item->set_value(L"hwonly", hg_items_[ind].deviceonly);
+ item->set_value(L"group", hg_items_[ind].group.c_str());
item->set_value(L"field", field_name(hg_items_[ind].field));
item->set_value(L"pos", hg_items_[ind].position);
item->set_value(L"visible", hg_items_[ind].visible);
@@ -6710,6 +6769,7 @@ std::string ChgjsonDlg::to_json_text(bool for_const, std::wstring* dev)
}
std::wstring key(L"");
item = (known_file_util::IJsonW*)create_json(ind, &header, &key);
+ //item->set_value(L"group", grpname.c_str());
// swprintf_s(buf, _countof(buf) - 1, L"%d", hg_items_[ind].index);
jsn->set_value(key.c_str(), item);
@@ -6751,7 +6811,8 @@ std::string ChgjsonDlg::to_json_text(bool for_const, std::wstring* dev)
void ChgjsonDlg::add_item(void* jsn_root, void* jsn_obj, HTREEITEM parent, bool old_ver)
{
known_file_util::IJsonW* jsn = (known_file_util::IJsonW*)jsn_obj, * child = NULL,
- * root = (known_file_util::IJsonW*)jsn_root;
+ * root = (known_file_util::IJsonW*)jsn_root;
+ std::wstring grp(get_tree_item_text(&tree_, parent));
const wchar_t* val = NULL;
HGITEM item;
wchar_t buf[128] = { 0 };
@@ -6801,15 +6862,21 @@ void ChgjsonDlg::add_item(void* jsn_root, void* jsn_obj, HTREEITEM parent, bool
}
jsn->get_value(L"size", item.bytes);
- jsn->get_value(L"category", &val);
+ jsn->get_value(L"cat", &val);
if (val && wcscmp(val, L"advanced") == 0)
item.advanced = true;
if (!jsn->get_value(L"readonly", item.readonly))
item.readonly = false;
- if (!jsn->get_value(L"affect-img", item.affect_img_param))
- item.affect_img_param = false;
- if (!jsn->get_value(L"hwonly", item.deviceonly))
- item.deviceonly = false;
+ if (!jsn->get_value(L"affect", item.affect))
+ item.affect = 0;
+ //if (!jsn->get_value(L"hwonly", item.deviceonly))
+ // item.deviceonly = false;
+ if (jsn->get_value(L"group", &val) && val)
+ {
+ item.group = coding::group_name(coding::group_index(val));
+ }
+ else
+ item.group = coding::group_name(coding::group_index(grp.c_str()));;
if (!jsn->get_value(L"visible", item.visible))
item.visible = true;
item.field = 0;
@@ -7454,19 +7521,35 @@ void ChgjsonDlg::OnBnClickedButton2()
int lines = 1;
char var[80] = { 0 };
- pos = txt.length();
- while (pos > 16 * 1024)
+ //pos = txt.length();
+ //while (pos > 16 * 1024)
+ //{
+ // pos -= 12 * 1024;
+ // while (txt[pos - 1] == '\\')
+ // pos++;
+ // lines++;
+ // sprintf_s(var, _countof(var) - 1, "\");\r\nstatic std::string jsontext%d(\"", lines);
+ // txt.insert(pos, var);
+ //}
+ //txt.insert(0, "static std::string jsontext1(\"");
+ //txt += "\");\r\n";
+
+ int varl = 30, segl = 12 * 1024;
+ txt.insert(0, "static std::string jsontext1(\"");
+ pos = varl;
+ while (txt.length() - pos > segl)
{
- pos -= 12 * 1024;
- while (txt[pos - 1] == '\\')
- pos++;
+ pos += segl;
lines++;
+ if (txt[pos - 1] == '\\')
+ pos++;
sprintf_s(var, _countof(var) - 1, "\");\r\nstatic std::string jsontext%d(\"", lines);
txt.insert(pos, var);
+ pos += 5 + varl;
}
- txt.insert(0, "static std::string jsontext1(\"");
txt += "\");\r\n";
+
file_util::set_clipboard(txt.c_str(), txt.length());
TCHAR msg[128] = { 0 };
@@ -7835,17 +7918,20 @@ void ChgjsonDlg::OnBnClickedButton4()
it->type = str;
it->advanced = ((CButton*)GetDlgItem(IDC_CHECK_ADVANCED))->GetCheck() == BST_CHECKED;
it->readonly = ((CButton*)GetDlgItem(IDC_CHECK_READONLY))->GetCheck() == BST_CHECKED;
- it->deviceonly = ((CButton*)GetDlgItem(IDC_CHECK_DEVICEONLY))->GetCheck() == BST_CHECKED;
+ //it->deviceonly = ((CButton*)GetDlgItem(IDC_CHECK_DEVICEONLY))->GetCheck() == BST_CHECKED;
+ //::GetDlgItemTextW(m_hWnd, IDC_COMBO7, str, _countof(str) - 1);
+ it->group = coding::group_name(group_.GetCurSel());
+ it->affect = affect_.GetCurSel() << 1;
it->visible = ((CButton*)GetDlgItem(IDC_CHECK_VISIBLE))->GetCheck() == BST_CHECKED;
it->range.type = constraint_.GetCurSel();
it->field = field_.GetCurSel();
it->unit = unit_.GetCurSel();
it->position = GetDlgItemInt(IDC_EDIT_POS);
- if (wcscmp(str, L"bool") == 0)
+ if (it->type == L"bool")
it->bytes = sizeof(SANE_Bool);
- else if (wcscmp(str, L"int") == 0)
+ else if (it->type == L"int")
it->bytes = sizeof(SANE_Int);
- else if (wcscmp(str, L"float") == 0)
+ else if (it->type == L"float")
it->bytes = sizeof(SANE_Fixed);
else // if (wcscmp(str, L"string") == 0)
{
diff --git a/tools/apps/hgjson/hgjsonDlg.h b/tools/apps/hgjson/hgjsonDlg.h
index 8a06eee..a1599dc 100644
--- a/tools/apps/hgjson/hgjsonDlg.h
+++ b/tools/apps/hgjson/hgjsonDlg.h
@@ -59,13 +59,14 @@ public:
std::wstring desc;
std::wstring type;
std::wstring init_val;
+ std::wstring group;
int index;
int bytes;
bool advanced;
bool readonly;
- bool deviceonly; // ֻ豸ϲ
+ //bool deviceonly; // ֻ豸ϲ - use readonly
bool visible;
- bool affect_img_param;
+ int affect;
int position;
int field;
int unit;
@@ -83,10 +84,11 @@ public:
desc = L"";
type = L"bool";
init_val = L"true";
+ group = L"base";
bytes = 4;
- advanced = readonly = deviceonly = affect_img_param = false;
+ advanced = readonly = /*deviceonly =*/ false;
visible = depend_or = true;
- position = field = unit = 0;
+ affect = position = field = unit = 0;
range.type = RANGE_TYPE_NONE;
}
}HGITEM;
@@ -180,6 +182,8 @@ public:
afx_msg void OnTreeUnifySequence();
CComboBox field_;
CComboBox unit_;
+ CComboBox group_;
+ CComboBox affect_;
};
diff --git a/tools/apps/hgjson/resource.h b/tools/apps/hgjson/resource.h
index 538ef2b..cc00c5d 100644
Binary files a/tools/apps/hgjson/resource.h and b/tools/apps/hgjson/resource.h differ
diff --git a/tools/sdk/lib/Debug/base_util.lib b/tools/sdk/lib/Debug/base_util.lib
index 850d7a4..8e5c14a 100644
Binary files a/tools/sdk/lib/Debug/base_util.lib and b/tools/sdk/lib/Debug/base_util.lib differ
diff --git a/tools/sdk/lib/Release/base_util.lib b/tools/sdk/lib/Release/base_util.lib
index 5bbcb59..7cc327c 100644
Binary files a/tools/sdk/lib/Release/base_util.lib and b/tools/sdk/lib/Release/base_util.lib differ
diff --git a/tools/solution/Release/hgjson.exe b/tools/solution/Release/hgjson.exe
index ba91360..c762371 100644
Binary files a/tools/solution/Release/hgjson.exe and b/tools/solution/Release/hgjson.exe differ