From 43bda37f71029205a0a23ebcdf41b2eef5b1ca29 Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Thu, 13 Feb 2020 08:21:48 +0100 Subject: [PATCH] Rename setTransShadow() to setColorOverlay() --- ChangeLog | 3 + README.md | 2 +- doc/faq.md | 2 +- doc/first-steps.md | 2 +- doc/widget-coordinates.svg | 976 ++++++++++------------------ doc/widget-geometry.svg | 966 ++++++++++------------------ doc/widget-lengths.svg | 1248 +++++++++++++----------------------- examples/transparent.cpp | 4 +- src/foptiattr.cpp | 10 +- src/fvterm.cpp | 24 +- src/fwidget_functions.cpp | 8 +- src/include/final/ftypes.h | 2 +- src/include/final/fvterm.h | 20 +- 13 files changed, 1152 insertions(+), 2115 deletions(-) diff --git a/ChangeLog b/ChangeLog index 66da4866..7af709df 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,6 @@ +2020-02-13 Markus Gans + * Rename setTransShadow() to setColorOverlay() + 2020-02-11 Markus Gans * Fix collapse() and expand() in FListViewItem() diff --git a/README.md b/README.md index ba88d07b..b5d66b9e 100644 --- a/README.md +++ b/README.md @@ -45,7 +45,7 @@ The FFileDialog widget with incremental file name search: ![FFileDialog](doc/fileopen-dialog.png) -The Final Cut FProgressbar widget: +The FINAL CUT FProgressbar widget: ![FProgressbar](doc/progress-bar.png) diff --git a/doc/faq.md b/doc/faq.md index 292a3198..edb0b5bc 100644 --- a/doc/faq.md +++ b/doc/faq.md @@ -6,7 +6,7 @@ Frequently Asked Questions What is FINAL CUT? ------------------ -The Final Cut is a [C++](https://en.wikipedia.org/wiki/C%2B%2B) class library +The FINAL CUT is a [C++](https://en.wikipedia.org/wiki/C%2B%2B) class library and a widget toolkit with full mouse support for creating a text-based user interface. It's based on the Termcap library and has its own cursor optimization and window management. diff --git a/doc/first-steps.md b/doc/first-steps.md index e812be36..ba6bb19b 100644 --- a/doc/first-steps.md +++ b/doc/first-steps.md @@ -55,7 +55,7 @@ emulator. It uses various optimization methods to improve the drawing speed. How to use the library ---------------------- -At the beginning of this introduction to the Final Cut +At the beginning of this introduction to the FINAL CUT we will start with a small example. The following example creates an empty 30×10 character dialog. diff --git a/doc/widget-coordinates.svg b/doc/widget-coordinates.svg index 7947ce06..694d2b1c 100644 --- a/doc/widget-coordinates.svg +++ b/doc/widget-coordinates.svg @@ -5,11 +5,11 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - id="svg165" - version="1.1" - width="233.1604mm" + height="142.65057mm" viewBox="-3.4827666 -3.5036988 233.1604 142.65057" - height="142.65057mm"> + width="233.1604mm" + version="1.1" + id="svg165"> @@ -25,730 +25,408 @@ + overflow="visible" + refX="0" + refY="0" + style="overflow:visible"> + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round" /> + overflow="visible" + refX="0" + refY="0" + style="overflow:visible"> + style="fill:none;stroke:#000000;stroke-width:1.00000003pt" /> + overflow="visible" + refX="0" + refY="0" + style="overflow:visible"> + style="fill:none;stroke:#000000;stroke-width:1.00000003pt" /> + overflow="visible" + refX="0" + refY="0" + style="overflow:visible"> + id="path8-7" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round" /> + overflow="visible" + refX="0" + refY="0" + style="overflow:visible"> + id="path5-6" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + id="Terminal" + transform="translate(2.0027161e-8,-1.1799729e-6)"> + height="139.04257" + width="229.55241" + id="background" + style="opacity:1;fill:#98b5ef;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> + d="m 73.582026,96.010501 h 84.672244 v 5.637389 H 73.582028 Z M 158.25427,33.999698 h 5.64481 V 101.6479 l -5.64481,-1e-5 z" /> - - - - - - - - - - - - - - + ry="0" /> + transform="translate(71.692613,37.697864)" + aria-label="Dialog" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.93888855px;line-height:125%;font-family:'Bitstream Vera Sans Mono';-inkscape-font-specification:'Bitstream Vera Sans Mono, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="title-bar-text"> + + + + + + + + + + + + + + + d="M 61.074994,46.475002 H 58.683557" /> + id="path4661" /> + id="path4982-36" /> + id="path4665" /> + d="m 510.18359,316.11914 c -1.46621,0 -2.55977,0.58334 -3.28125,1.75 -0.71566,1.16667 -1.07226,2.93858 -1.07226,5.31445 0,2.36979 0.35661,4.13802 1.07226,5.30469 0.72148,1.16667 1.8091,1.75 3.26368,1.75 0.0465,0 0.10796,-0.004 0.18359,-0.01 -0.0488,0.12717 1.33074,-0.19815 1.57569,-0.41698 l 1.28368,0.84276 1.26563,-0.56055 -1.06836,-1.21875 c 0.32119,-0.33486 0.4522,-0.54975 0.64258,-0.95312 0.1363,-0.31537 0.5,-2.95183 0.5,-4.73829 0,-2.37587 -0.36056,-4.14778 -1.08203,-5.31445 -0.71565,-1.16666 -1.81117,-1.75 -3.28321,-1.75 z m 0,1.49414 c 0.89602,0 1.53987,0.42839 1.92969,1.28516 0.39565,0.85677 0.59375,2.28406 0.59375,4.2832 0,1.99913 -0.1981,3.42838 -0.59375,4.28516 -0.30165,-0.10534 -0.78096,-0.85138 -1.30469,-0.84571 l -1.45507,0.31641 1.03906,1.17969 0.4375,0.52539 c 0.0131,-7.4e-4 0.0224,-0.005 0.0351,-0.006 -0.20919,0.0651 -0.43368,0.10547 -0.68164,0.10547 -0.8902,0 -1.53209,-0.42839 -1.92773,-1.28516 -0.38983,-0.85677 -0.58398,-2.28233 -0.58398,-4.27539 -10e-6,-1.99914 0.19416,-3.42643 0.58398,-4.2832 0.39564,-0.85677 1.03753,-1.28516 1.92773,-1.28516 z" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + style="fill:none;stroke:#7c7c7c;stroke-width:0.106363;stroke-dasharray:0.212725, 0.106363, 0.053181, 0.106363;stroke-opacity:0.57478602" /> getDesktopWidth() = 80 + y="120.19452" + id="text79">getDesktopWidth() = 80 getDesktopHeight() = 24 + y="125.13338" + id="text81">getDesktopHeight() = 24 + style="fill:none;stroke:#000000;stroke-width:0.40613499;marker-start:url(#r-9);marker-end:url(#c-2)" /> + y="9.6283751" + id="text89"> getPos() = (25,6) + id="tspan85">getPos() = (25,6) getTermPos() = (25,6) + id="tspan87">getTermPos() = (25,6) - getY() = 6 - getTermY() = 6 - - - - - getX() = 25 - getTermX() = 25 - - - - (1,1) - - - - (80,24) - - - - - getX() = 19 - getTermX() = 44 - - - - getY() = 8 - getTermY() = 15 - - getPos() = (19,8) + font-size="3.880556" + x="80.911568" + y="13.147828" + id="tspan93" + style="font-size:3.88055611px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;stroke-width:0.26458299">getY() = 6 getTermPos() = (44,15) + font-size="3.880556" + x="80.911568" + y="17.998522" + id="tspan95" + style="font-size:3.88055611px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;stroke-width:0.26458299">getTermY() = 6 + d="M 68.681659,39.660894 H 0.24701944" + id="path91" + style="fill:none;stroke:#000000;stroke-width:0.40613499;marker-start:url(#a-3);marker-end:url(#r-9)" /> + + getX() = 25 + getTermX() = 25 + + + + id="text81-3"> (80,1) + y="4.3176794" + x="7.6337833" + id="tspan4561">(1,1) + width="2.8310132" + id="rect4575" + style="opacity:1;fill:#aa4f5d;fill-opacity:0.27777782;stroke:#aa4f5d;stroke-width:0.13229166;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> + x="217.05225" + y="133.3719" + id="text81-3-0"> (1,24) + y="133.3719" + x="217.05225" + id="tspan4598">(80,24) + + + getX() = 19 + getTermX() = 44 + + + + getY() = 8 + getTermY() = 15 + + + getPos() = (19,8) + getTermPos() = (44,15) + + + + (80,1) + + + + (1,24) + + + height="5.6135254" + width="2.8310132" + id="rect4575-6" + style="opacity:1;fill:#aa4f5d;fill-opacity:0.27777782;stroke:#aa4f5d;stroke-width:0.13229166;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1" /> diff --git a/doc/widget-geometry.svg b/doc/widget-geometry.svg index 6d2f0923..e7a6451b 100644 --- a/doc/widget-geometry.svg +++ b/doc/widget-geometry.svg @@ -5,11 +5,11 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - id="svg165" - version="1.1" - width="233.1604mm" + height="142.65057mm" viewBox="-3.4827666 -3.5036988 233.1604 142.65057" - height="142.65057mm"> + width="233.1604mm" + version="1.1" + id="svg165"> @@ -25,779 +25,457 @@ + overflow="visible" + refX="0" + refY="0" + style="overflow:visible"> + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round" /> + overflow="visible" + refX="0" + refY="0" + style="overflow:visible"> + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round" /> + overflow="visible" + refX="0" + refY="0" + style="overflow:visible"> + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round" /> + overflow="visible" + refX="0" + refY="0" + style="overflow:visible"> + id="path5-6-7" + style="fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + height="139.04257" + width="229.55241" + id="background" + style="opacity:1;fill:#98b5ef;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> + d="m 73.582026,96.010501 h 84.672244 v 5.637389 H 73.582028 Z M 158.25427,33.999698 h 5.64481 V 101.6479 l -5.64481,-1e-5 z" /> - - - - - - - - - - - - - - + ry="0" /> + transform="translate(71.692613,37.697864)" + aria-label="Dialog" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.93888855px;line-height:125%;font-family:'Bitstream Vera Sans Mono';-inkscape-font-specification:'Bitstream Vera Sans Mono, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="title-bar-text"> + + + + + + + + + + + + + + + d="M 61.074994,46.475002 H 58.683557" /> + id="path4661" /> + id="path4982-36" /> + id="path4665" /> + d="m 510.18359,316.11914 c -1.46621,0 -2.55977,0.58334 -3.28125,1.75 -0.71566,1.16667 -1.07226,2.93858 -1.07226,5.31445 0,2.36979 0.35661,4.13802 1.07226,5.30469 0.72148,1.16667 1.8091,1.75 3.26368,1.75 0.0465,0 0.10796,-0.004 0.18359,-0.01 -0.0488,0.12717 1.33074,-0.19815 1.57569,-0.41698 l 1.28368,0.84276 1.26563,-0.56055 -1.06836,-1.21875 c 0.32119,-0.33486 0.4522,-0.54975 0.64258,-0.95312 0.1363,-0.31537 0.5,-2.95183 0.5,-4.73829 0,-2.37587 -0.36056,-4.14778 -1.08203,-5.31445 -0.71565,-1.16666 -1.81117,-1.75 -3.28321,-1.75 z m 0,1.49414 c 0.89602,0 1.53987,0.42839 1.92969,1.28516 0.39565,0.85677 0.59375,2.28406 0.59375,4.2832 0,1.99913 -0.1981,3.42838 -0.59375,4.28516 -0.30165,-0.10534 -0.78096,-0.85138 -1.30469,-0.84571 l -1.45507,0.31641 1.03906,1.17969 0.4375,0.52539 c 0.0131,-7.4e-4 0.0224,-0.005 0.0351,-0.006 -0.20919,0.0651 -0.43368,0.10547 -0.68164,0.10547 -0.8902,0 -1.53209,-0.42839 -1.92773,-1.28516 -0.38983,-0.85677 -0.58398,-2.28233 -0.58398,-4.27539 -10e-6,-1.99914 0.19416,-3.42643 0.58398,-4.2832 0.39564,-0.85677 1.03753,-1.28516 1.92773,-1.28516 z" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + style="fill:none;stroke:#7c7c7c;stroke-width:0.106363;stroke-dasharray:0.212725, 0.106363, 0.053181, 0.106363;stroke-opacity:0.57478602" /> + id="path163" /> + y="4.9554229" + id="text89"> getSize() = FSize(32,12) + x="41.527641" + y="4.9554229">getSize() = FSize(32,12) + style="fill:none;stroke:#000000;stroke-width:0.40613499;marker-start:url(#b-0-367)" /> + id="text89-30"> = FPoint(25,6), FPoint(56,17) - - - getGeometry() = FPoint(25,6), FSize(32,12) - - - getTermGeometry() = FPoint(25,6), FSize(32,12) - - - = FPoint(25,6), FPoint(56,17) + + + getGeometry() = FPoint(25,6), FSize(32,12) + + + getTermGeometry() = FPoint(25,6), FSize(32,12) + + + = FPoint(25,6), FPoint(56,17) + x="57.409531" + id="tspan4726-3-0">= FPoint(25,6), FPoint(56,17) + y="107.47711" + id="text89-30-2-0"> getShadow() = FSize(2,1) + x="35.089531" + id="tspan4726-3-5-3">getShadow() = FSize(2,1) + y="112.85639" + id="text89-30-4-0"> getGeometryWithShadow() = FPoint(25,6), FSize(34,13) + x="10.800667" + id="tspan4726-3-0-9">getGeometryWithShadow() = FPoint(25,6), FSize(34,13) + id="text89-30-4-0-2"> = FPoint(25,6), FPoint(58,18) - - - getTermGeometryWithShadow() = FPoint(25,6), FSize(34,13) - - - = FPoint(25,6), FPoint(58,18) + + + getTermGeometryWithShadow() = FPoint(25,6), FSize(34,13) + + + = FPoint(25,6), FPoint(58,18) + x="57.209534" + id="tspan4726-3-0-9-5-9">= FPoint(25,6), FPoint(58,18) + y="4.9555144" + id="text89-7"> getSize() = FSize(10,1) + x="157.04732" + y="4.9555144">getSize() = FSize(10,1) + id="text89-30-5"> = FPoint(19,8), FPoint(28,8) + x="172.90981" + id="tspan4726-3-4">= FPoint(19,8), FPoint(28,8) + y="10.262533" + id="text89-30-0-8"> getGeometry() = FPoint(19,8), FSize(10,1) + x="147.83995" + id="tspan4726-3-9-1">getGeometry() = FPoint(19,8), FSize(10,1) + y="20.876591" + id="text89-30-2-2"> getTermGeometry() = FPoint(44,15), FSize(10,1) + x="138.81775" + id="tspan4726-3-5-8">getTermGeometry() = FPoint(44,15), FSize(10,1) + id="text89-30-4-9"> = FPoint(44,15), FPoint(53,15) + x="172.90981" + id="tspan4726-3-0-3">= FPoint(44,15), FPoint(53,15) + y="107.47724" + id="text89-30-2-0-6"> getShadow() = FSize(1,1) + x="150.6093" + id="tspan4726-3-5-3-8">getShadow() = FSize(1,1) + y="112.8565" + id="text89-30-4-0-0"> getGeometryWithShadow() = FPoint(19,8), FSize(11,2) + x="126.32072" + id="tspan4726-3-0-9-2">getGeometryWithShadow() = FPoint(19,8), FSize(11,2) + id="text89-30-4-0-2-1"> = FPoint(19,8), FPoint(29,9) - - - getTermGeometryWithShadow() = FPoint(44,15), FSize(11,2) - - - = FPoint(19,8), FPoint(29,9) + + + getTermGeometryWithShadow() = FPoint(44,15), FSize(11,2) + + + = FPoint(44,15), FPoint(54,16) + x="172.90981" + id="tspan4726-3-0-9-5-9-0">= FPoint(44,15), FPoint(54,16) + style="fill:none;stroke:#000000;stroke-width:0.40613499;marker-start:url(#b-0-3)" /> + style="fill:none;stroke:#000000;stroke-width:0.40613502;marker-start:url(#b-0-3-5)" /> + style="fill:none;stroke:#000000;stroke-width:0.40613505;marker-start:url(#b-0-36)" /> + x="3.8918011" + y="71.00386" + id="text89-30-2-0-6-3"> FDialog() + x="3.8918011" + y="71.00386">FDialog() + x="182.95201" + y="71.079964" + id="text89-30-2-0-6-3-4"> FButton() + x="182.95201" + id="tspan4894-0">FButton() diff --git a/doc/widget-lengths.svg b/doc/widget-lengths.svg index 3fec6028..0a0897df 100644 --- a/doc/widget-lengths.svg +++ b/doc/widget-lengths.svg @@ -5,11 +5,11 @@ xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:svg="http://www.w3.org/2000/svg" xmlns="http://www.w3.org/2000/svg" - id="svg165" - version="1.1" - width="233.1604mm" + height="142.65057mm" viewBox="-3.4827666 -3.5036988 233.1604 142.65057" - height="142.65057mm"> + width="233.1604mm" + version="1.1" + id="svg165"> @@ -25,1000 +25,678 @@ + refX="0" + overflow="visible" + orient="auto" + id="i-3"> + transform="scale(0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="h-7"> + transform="scale(-0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="k-3"> + transform="scale(0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="j-6"> + transform="scale(-0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="r-91"> - - - - - - - - - + + + + + + + + + + transform="scale(0.8)" + d="M 0,5.65 V -5.65" /> + refX="0" + overflow="visible" + orient="auto" + id="b-6"> + transform="scale(0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="e-6"> + transform="scale(0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="d-8"> + transform="scale(-0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="g-9"> + transform="scale(0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="f-0"> + transform="scale(-0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="m-3"> + transform="scale(0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="l-5"> + transform="scale(-0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="o-2"> + transform="scale(0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="n-8"> + transform="scale(-0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="q-7"> + transform="scale(0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="p-6"> + transform="scale(-0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="t-2"> + transform="scale(0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="u-3"> + transform="scale(-0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="v-9"> - - - - - - + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> + refX="0" + overflow="visible" + orient="auto" + id="w-7"> + + + + + + + transform="scale(-0.6)" + d="M 8.7185878,4.0337352 -2.2072895,0.01601326 8.7185884,-4.0017078 c -1.7454984,2.3720609 -1.7354408,5.6174519 -6e-7,8.035443 z" /> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + height="139.04257" + width="229.55241" + id="background" + style="opacity:1;fill:#98b5ef;fill-opacity:1;stroke:none;stroke-width:0.26458332;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:1.5;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" /> + d="m 73.582026,96.010501 h 84.672244 v 5.637389 H 73.582028 Z M 158.25427,33.999698 h 5.64481 V 101.6479 l -5.64481,-1e-5 z" /> - - - - - - - - - - - - - - + ry="0" /> + transform="translate(71.692613,37.697864)" + aria-label="Dialog" + style="font-style:normal;font-variant:normal;font-weight:normal;font-stretch:normal;font-size:4.93888855px;line-height:125%;font-family:'Bitstream Vera Sans Mono';-inkscape-font-specification:'Bitstream Vera Sans Mono, Normal';font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:0.26458332px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" + id="title-bar-text"> + + + + + + + + + + + + + + + d="M 61.074994,46.475002 H 58.683557" /> + id="path4661" /> + id="path4982-36" /> + id="path4665" /> + d="m 510.18359,316.11914 c -1.46621,0 -2.55977,0.58334 -3.28125,1.75 -0.71566,1.16667 -1.07226,2.93858 -1.07226,5.31445 0,2.36979 0.35661,4.13802 1.07226,5.30469 0.72148,1.16667 1.8091,1.75 3.26368,1.75 0.0465,0 0.10796,-0.004 0.18359,-0.01 -0.0488,0.12717 1.33074,-0.19815 1.57569,-0.41698 l 1.28368,0.84276 1.26563,-0.56055 -1.06836,-1.21875 c 0.32119,-0.33486 0.4522,-0.54975 0.64258,-0.95312 0.1363,-0.31537 0.5,-2.95183 0.5,-4.73829 0,-2.37587 -0.36056,-4.14778 -1.08203,-5.31445 -0.71565,-1.16666 -1.81117,-1.75 -3.28321,-1.75 z m 0,1.49414 c 0.89602,0 1.53987,0.42839 1.92969,1.28516 0.39565,0.85677 0.59375,2.28406 0.59375,4.2832 0,1.99913 -0.1981,3.42838 -0.59375,4.28516 -0.30165,-0.10534 -0.78096,-0.85138 -1.30469,-0.84571 l -1.45507,0.31641 1.03906,1.17969 0.4375,0.52539 c 0.0131,-7.4e-4 0.0224,-0.005 0.0351,-0.006 -0.20919,0.0651 -0.43368,0.10547 -0.68164,0.10547 -0.8902,0 -1.53209,-0.42839 -1.92773,-1.28516 -0.38983,-0.85677 -0.58398,-2.28233 -0.58398,-4.27539 -10e-6,-1.99914 0.19416,-3.42643 0.58398,-4.2832 0.39564,-0.85677 1.03753,-1.28516 1.92773,-1.28516 z" + style="font-style:normal;font-variant:normal;font-weight:bold;font-stretch:normal;font-size:medium;line-height:125%;font-family:Arial;-inkscape-font-specification:'Arial Bold';text-align:start;letter-spacing:0px;word-spacing:0px;writing-mode:lr-tb;text-anchor:start;fill:#ffffff;fill-opacity:1;stroke:none;stroke-width:1px;stroke-linecap:butt;stroke-linejoin:miter;stroke-opacity:1" /> + style="fill:none;stroke:#7c7c7c;stroke-width:0.106363;stroke-dasharray:0.212725, 0.106363, 0.053181, 0.106363;stroke-opacity:0.57478602" /> + id="path163" /> + d="M 0.71750465,127.07532 H 94.653983 m 36.300447,0 h 38.31176 56.1829" /> + d="M 217.42769,0.67868155 V 50.334198 m 0,36.70988 0.10543,47.877372" /> getDesktopWidth() + y="128.09375" + x="112.81702" + font-size="3.880556">getDesktopWidth() getDesktopHeight() + y="218.60313" + x="-67.922623" + transform="rotate(-90)" + font-size="3.880556">getDesktopHeight() + d="M 79.195185,0.1864336 V 30.96059" /> + y="8.0025988" + x="38.52689" + font-size="4.233334"> getPos() + y="8.0025988" + x="38.52689">getPos() getTermPos() + y="13.294264" + x="38.52689">getTermPos() + d="M 68.659479,39.622603 H 0.22484765" /> + y="13.109548" + x="80.360222" + font-size="3.880556"> getY() - getY() + getTermY() + y="17.960236" + x="80.360222" + font-size="3.880556">getTermY() + d="M 69.022514,30.892409 51.629013,15.07587" /> + y="38.16193" + x="23.507547" + font-size="3.880556"> getX() - getX() + getTermX() + y="43.01263" + x="23.507547" + font-size="3.880556">getTermX() + style="fill:none;stroke:#000000;stroke-width:0.40613502;marker-start:url(#e-6);marker-end:url(#d-8)" /> getWidth() + y="105.70465" + x="113.03175" + font-size="3.880556">getWidth() + d="m 168.43921,28.879659 v 24.612857 m 0.0915,23.177635 0.0139,18.749915" /> - getHeight() - - - - - - - + getHeight() + + + + + + + getClientHeight() + y="177.81908" + x="-64.977974" + transform="rotate(-90)" + font-size="3.880556">getClientHeight() + y="34.690594" + x="190.8372" + font-size="4.233333"> getTopPadding() + font-size="3.527778">getTopPadding() + y="93.831383" + x="179.42957" + font-size="4.233334"> getBottomPadding() + font-size="3.527778">getBottomPadding() + style="fill:none;stroke:#000000;stroke-width:0.32675999;marker-start:url(#o-2);marker-end:url(#n-8)" /> + style="fill:none;stroke:#000000;stroke-width:0.32675999;marker-start:url(#q-7);marker-end:url(#p-6)" /> + style="fill:none;stroke:#000000;stroke-width:0.32675999;stroke-dasharray:0.98028101, 0.98028101" /> + style="fill:none;stroke:#000000;stroke-width:0.32675999;stroke-dasharray:0.98028101, 0.98028101" /> + style="fill:none;stroke:#000000;stroke-width:0.32675999;stroke-dasharray:0.98028101, 0.98028101" /> + style="fill:none;stroke:#000000;stroke-width:0.32675999;stroke-dasharray:0.98028101, 0.98028101" /> + style="fill:none;stroke:#000000;stroke-width:0.32675999;marker-start:url(#t-2);marker-end:url(#u-3)" /> + style="fill:none;stroke:#000000;stroke-width:0.32675999;marker-start:url(#v-9);marker-end:url(#w-7)" /> + y="116.48471" + x="163.30989" + font-size="4.233334"> getRightPadding() + font-size="3.527778">getRightPadding() + y="116.32534" + x="76.057518" + font-size="4.233334"> getLeftPadding() + font-size="3.527778">getLeftPadding() + d="m 71.346359,110.06317 c 9.156515,0.0101 18.313083,-0.0139 27.469578,0.0102 m 30.441293,-0.026 25.48321,0.003" /> getClientWidth() + y="111.1342" + x="113.27158" + font-size="3.880556">getClientWidth() diff --git a/examples/transparent.cpp b/examples/transparent.cpp index f242a3e5..fba62c39 100644 --- a/examples/transparent.cpp +++ b/examples/transparent.cpp @@ -91,7 +91,7 @@ void Transparent::draw() { const auto& wc = getFWidgetColors(); setColor(wc.shadow_bg, wc.shadow_fg); - setTransShadow(); + setColorOverlay(); } else if ( type == inherit_background ) { @@ -113,7 +113,7 @@ void Transparent::draw() } if ( type == shadow ) - unsetTransShadow(); + unsetColorOverlay(); else if ( type == inherit_background ) unsetInheritBackground(); else diff --git a/src/foptiattr.cpp b/src/foptiattr.cpp index 79191ddc..4e3f3811 100644 --- a/src/foptiattr.cpp +++ b/src/foptiattr.cpp @@ -38,11 +38,11 @@ namespace finalcut FOptiAttr::FOptiAttr() { // Set bits that must not be reset - reset_byte_mask.attr.bit.transparent = true; - reset_byte_mask.attr.bit.trans_shadow = true; - reset_byte_mask.attr.bit.inherit_bg = true; - reset_byte_mask.attr.bit.no_changes = true; - reset_byte_mask.attr.bit.printed = true; + reset_byte_mask.attr.bit.transparent = true; + reset_byte_mask.attr.bit.color_overlay = true; + reset_byte_mask.attr.bit.inherit_bg = true; + reset_byte_mask.attr.bit.no_changes = true; + reset_byte_mask.attr.bit.printed = true; } //---------------------------------------------------------------------- diff --git a/src/fvterm.cpp b/src/fvterm.cpp index 70bcfbc5..f3567fc3 100644 --- a/src/fvterm.cpp +++ b/src/fvterm.cpp @@ -528,17 +528,17 @@ int FVTerm::print (FTermArea* area, FChar& term_char) if ( *ac != nc ) // compare with an overloaded operator { - if ( ( ! ac->attr.bit.transparent && nc.attr.bit.transparent ) - || ( ! ac->attr.bit.trans_shadow && nc.attr.bit.trans_shadow ) - || ( ! ac->attr.bit.inherit_bg && nc.attr.bit.inherit_bg ) ) + if ( ( ! ac->attr.bit.transparent && nc.attr.bit.transparent ) + || ( ! ac->attr.bit.color_overlay && nc.attr.bit.color_overlay ) + || ( ! ac->attr.bit.inherit_bg && nc.attr.bit.inherit_bg ) ) { // add one transparent character form line area->changes[ay].trans_count++; } - if ( ( ac->attr.bit.transparent && ! nc.attr.bit.transparent ) - || ( ac->attr.bit.trans_shadow && ! nc.attr.bit.trans_shadow ) - || ( ac->attr.bit.inherit_bg && ! nc.attr.bit.inherit_bg ) ) + if ( ( ac->attr.bit.transparent && ! nc.attr.bit.transparent ) + || ( ac->attr.bit.color_overlay && ! nc.attr.bit.color_overlay ) + || ( ac->attr.bit.inherit_bg && ! nc.attr.bit.inherit_bg ) ) { // remove one transparent character from line area->changes[ay].trans_count--; @@ -1231,7 +1231,7 @@ void FVTerm::clearArea (FTermArea* area, int fillchar) area->changes[i].xmax = w - 1; if ( nc.attr.bit.transparent - || nc.attr.bit.trans_shadow + || nc.attr.bit.color_overlay || nc.attr.bit.inherit_bg ) area->changes[i].trans_count = w; else if ( area->right_shadow != 0 ) @@ -1404,7 +1404,7 @@ FVTerm::covered_state FVTerm::isCovered ( const FPoint& pos const int y = pos.getY(); auto tmp = &win->data[(y - win_y) * width + (x - win_x)]; - if ( tmp->attr.bit.trans_shadow ) + if ( tmp->attr.bit.color_overlay ) { is_covered = half_covered; } @@ -1589,7 +1589,7 @@ bool FVTerm::updateVTermCharacter ( FTermArea* area } else // Not transparent { - if ( ac->attr.bit.trans_shadow ) // Transparent shadow + if ( ac->attr.bit.color_overlay ) // Transparent shadow { updateShadedCharacter (area, area_pos, terminal_pos); } @@ -1737,7 +1737,7 @@ FChar FVTerm::generateCharacter (const FPoint& pos) if ( ! tmp->attr.bit.transparent ) // Current character not transparent { - if ( tmp->attr.bit.trans_shadow ) // Transparent shadow + if ( tmp->attr.bit.color_overlay ) // Transparent shadow { // Keep the current vterm character if ( sc != &s_ch ) @@ -1969,7 +1969,7 @@ void FVTerm::putAreaCharacter ( const FPoint& pos, FVTerm* obj } else // Mot transparent { - if ( ac->attr.bit.trans_shadow ) // Transparent shadow + if ( ac->attr.bit.color_overlay ) // Transparent shadow { // Get covered character + add the current color FChar ch = getCoveredCharacter (pos, obj); @@ -2016,7 +2016,7 @@ void FVTerm::getAreaCharacter ( const FPoint& pos, FTermArea* area // Current character not transparent if ( ! tmp->attr.bit.transparent ) { - if ( tmp->attr.bit.trans_shadow ) // transparent shadow + if ( tmp->attr.bit.color_overlay ) // transparent shadow { // Keep the current vterm character std::memcpy (&s_ch, cc, sizeof(s_ch)); diff --git a/src/fwidget_functions.cpp b/src/fwidget_functions.cpp index dc9f255a..5624794f 100644 --- a/src/fwidget_functions.cpp +++ b/src/fwidget_functions.cpp @@ -156,22 +156,22 @@ void drawTransparentShadow (FWidget* w) w->print() << FPoint(int(width) + 1, 1) << " "; w->unsetTransparent(); w->setColor (w->wcolors.shadow_bg, w->wcolors.shadow_fg); - w->setTransShadow(); + w->setColorOverlay(); for (std::size_t y{1}; y < height; y++) { w->print() << FPoint(int(width) + 1, int(y) + 1) << " "; } - w->unsetTransShadow(); + w->unsetColorOverlay(); w->setTransparent(); w->print() << FPoint(1, int(height) + 1) << " "; w->unsetTransparent(); w->setColor (w->wcolors.shadow_bg, w->wcolors.shadow_fg); - w->setTransShadow(); + w->setColorOverlay(); w->print() << FString(width, L' '); - w->unsetTransShadow(); + w->unsetColorOverlay(); if ( w->isMonochron() ) w->setReverse(false); diff --git a/src/include/final/ftypes.h b/src/include/final/ftypes.h index 0bd41da5..90332021 100644 --- a/src/include/final/ftypes.h +++ b/src/include/final/ftypes.h @@ -133,7 +133,7 @@ typedef struct uInt8 alt_charset : 1; // alternate character set (vt100) uInt8 pc_charset : 1; // pc character set (CP437) uInt8 transparent : 1; // transparent - uInt8 trans_shadow : 1; // transparent shadow + uInt8 color_overlay : 1; // color overlay uInt8 inherit_bg : 1; // inherit background // Attribute byte #2 uInt8 no_changes : 1; // no changes required diff --git a/src/include/final/fvterm.h b/src/include/final/fvterm.h index d41bb6f4..fdc7dbcf 100644 --- a/src/include/final/fvterm.h +++ b/src/include/final/fvterm.h @@ -226,9 +226,9 @@ class FVTerm static bool setTransparent(); static bool unsetTransparent(); - static bool setTransShadow (bool); - static bool setTransShadow(); - static bool unsetTransShadow(); + static bool setColorOverlay (bool); + static bool setColorOverlay(); + static bool unsetColorOverlay(); static bool setInheritBackground (bool); static bool setInheritBackground(); @@ -838,16 +838,16 @@ inline bool FVTerm::unsetTransparent() { return setTransparent(false); } //---------------------------------------------------------------------- -inline bool FVTerm::setTransShadow (bool enable) -{ return (next_attribute.attr.bit.trans_shadow = enable); } +inline bool FVTerm::setColorOverlay (bool enable) +{ return (next_attribute.attr.bit.color_overlay = enable); } //---------------------------------------------------------------------- -inline bool FVTerm::setTransShadow() -{ return setTransShadow(true); } +inline bool FVTerm::setColorOverlay() +{ return setColorOverlay(true); } //---------------------------------------------------------------------- -inline bool FVTerm::unsetTransShadow() -{ return setTransShadow(false); } +inline bool FVTerm::unsetColorOverlay() +{ return setColorOverlay(false); } //---------------------------------------------------------------------- inline bool FVTerm::setInheritBackground (bool enable) @@ -939,7 +939,7 @@ inline bool FVTerm::isTransparent() //---------------------------------------------------------------------- inline bool FVTerm::isTransShadow() -{ return next_attribute.attr.bit.trans_shadow; } +{ return next_attribute.attr.bit.color_overlay; } //---------------------------------------------------------------------- inline bool FVTerm::isInheritBackground()