Replaces some C-style arrays with std::array
This commit is contained in:
parent
61d88eb413
commit
a821030333
|
@ -1,3 +1,8 @@
|
|||
2020-10-04 Markus Gans <guru.mail@muenster.de>
|
||||
* Replaces some C-style arrays with std::array
|
||||
* Now you can use the arrow keys to move a window into the visible area
|
||||
* Removes FData memory leak in FListBoxItem and FListViewItem
|
||||
|
||||
2020-09-27 Markus Gans <guru.mail@muenster.de>
|
||||
* An explanation of the widget tree was added to the document
|
||||
of the first steps
|
||||
|
|
|
@ -5,41 +5,13 @@
|
|||
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"
|
||||
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
|
||||
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
|
||||
id="svg61"
|
||||
version="1.1"
|
||||
width="149.86537mm"
|
||||
viewBox="0 0 149.86537 65.484895"
|
||||
height="65.484894mm"
|
||||
sodipodi:docname="final-cut-widget tree.svg"
|
||||
inkscape:version="0.92.1 r15371">
|
||||
<sodipodi:namedview
|
||||
pagecolor="#ffffff"
|
||||
bordercolor="#666666"
|
||||
borderopacity="1"
|
||||
objecttolerance="10"
|
||||
gridtolerance="10"
|
||||
guidetolerance="10"
|
||||
inkscape:pageopacity="0"
|
||||
inkscape:pageshadow="2"
|
||||
inkscape:window-width="3840"
|
||||
inkscape:window-height="1984"
|
||||
id="namedview67"
|
||||
showgrid="false"
|
||||
fit-margin-top="0"
|
||||
fit-margin-left="0"
|
||||
fit-margin-right="0"
|
||||
fit-margin-bottom="0"
|
||||
inkscape:zoom="4.5793919"
|
||||
inkscape:cx="296"
|
||||
inkscape:cy="123.75099"
|
||||
inkscape:window-x="0"
|
||||
inkscape:window-y="55"
|
||||
inkscape:window-maximized="1"
|
||||
inkscape:current-layer="svg61" />
|
||||
viewBox="0 0 149.86537 65.484895"
|
||||
width="149.86537mm"
|
||||
version="1.1"
|
||||
id="svg109">
|
||||
<metadata
|
||||
id="metadata67">
|
||||
id="metadata115">
|
||||
<rdf:RDF>
|
||||
<cc:Work
|
||||
rdf:about="">
|
||||
|
@ -51,364 +23,302 @@
|
|||
</rdf:RDF>
|
||||
</metadata>
|
||||
<defs
|
||||
id="defs65">
|
||||
id="defs113" />
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow1Mend"
|
||||
id="a"
|
||||
orient="auto"
|
||||
overflow="visible"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto">
|
||||
refY="0">
|
||||
<path
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
id="path4659"
|
||||
inkscape:connector-curvature="0" />
|
||||
d="m0 0 5-5-17.5 5 17.5 5z"
|
||||
fill-rule="evenodd"
|
||||
stroke="#000"
|
||||
stroke-width="1pt"
|
||||
transform="matrix(-.4 0 0 -.4 -4 0)"
|
||||
id="path2" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow2Lend"
|
||||
id="b"
|
||||
orient="auto"
|
||||
overflow="visible"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto">
|
||||
refY="0">
|
||||
<path
|
||||
transform="matrix(-1.1,0,0,-1.1,-1.1,0)"
|
||||
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"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.625;stroke-linejoin:round;stroke-opacity:1"
|
||||
id="path4671"
|
||||
inkscape:connector-curvature="0" />
|
||||
d="m0 0 5-5-17.5 5 17.5 5z"
|
||||
fill-rule="evenodd"
|
||||
stroke="#000"
|
||||
stroke-width="1pt"
|
||||
transform="matrix(-.4 0 0 -.4 -4 0)"
|
||||
id="path5" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow1Lstart"
|
||||
id="c"
|
||||
orient="auto"
|
||||
overflow="visible"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto">
|
||||
refY="0">
|
||||
<path
|
||||
transform="matrix(0.8,0,0,0.8,10,0)"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
id="path4650"
|
||||
inkscape:connector-curvature="0" />
|
||||
d="m0 0 5-5-17.5 5 17.5 5z"
|
||||
fill-rule="evenodd"
|
||||
stroke="#000"
|
||||
stroke-width="1pt"
|
||||
transform="matrix(-.4 0 0 -.4 -4 0)"
|
||||
id="path8" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow1Mend-9"
|
||||
id="d"
|
||||
orient="auto"
|
||||
overflow="visible"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto">
|
||||
refY="0">
|
||||
<path
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
id="path4659-6"
|
||||
inkscape:connector-curvature="0" />
|
||||
d="m0 0 5-5-17.5 5 17.5 5z"
|
||||
fill-rule="evenodd"
|
||||
stroke="#000"
|
||||
stroke-width="1pt"
|
||||
transform="matrix(-.4 0 0 -.4 -4 0)"
|
||||
id="path11" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow1Mend-9-7"
|
||||
id="e"
|
||||
orient="auto"
|
||||
overflow="visible"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto">
|
||||
refY="0">
|
||||
<path
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
id="path4659-6-0"
|
||||
inkscape:connector-curvature="0" />
|
||||
d="m0 0 5-5-17.5 5 17.5 5z"
|
||||
fill-rule="evenodd"
|
||||
stroke="#000"
|
||||
stroke-width="1pt"
|
||||
transform="matrix(-.4 0 0 -.4 -4 0)"
|
||||
id="path14" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow1Mend-9-7-1"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto">
|
||||
<path
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
id="path4659-6-0-3"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
<marker
|
||||
style="overflow:visible"
|
||||
id="Arrow1Mend-9-7-1-7"
|
||||
refX="0"
|
||||
refY="0"
|
||||
orient="auto">
|
||||
<path
|
||||
transform="matrix(-0.4,0,0,-0.4,-4,0)"
|
||||
style="fill:#000000;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.00000003pt;stroke-opacity:1"
|
||||
d="M 0,0 5,-5 -12.5,0 5,5 Z"
|
||||
id="path4659-6-0-3-2"
|
||||
inkscape:connector-curvature="0" />
|
||||
</marker>
|
||||
</defs>
|
||||
<linearGradient
|
||||
y2="222.78156"
|
||||
y1="296.49637"
|
||||
x2="34.111275"
|
||||
x1="33.698196"
|
||||
gradientUnits="userSpaceOnUse"
|
||||
id="a">
|
||||
<stop
|
||||
style="stop-color:#e8a7a7;stop-opacity:1"
|
||||
id="stop2"
|
||||
stop-color="#dbdbdc"
|
||||
offset="0" />
|
||||
<stop
|
||||
id="stop4"
|
||||
stop-color="#fff"
|
||||
offset="1" />
|
||||
</linearGradient>
|
||||
<g
|
||||
id="g59"
|
||||
style="stroke-width:1.20796704"
|
||||
id="g57">
|
||||
<g
|
||||
transform="matrix(0.82806766,0,0,0.82760652,18.811674,-210.24741)"
|
||||
style="stroke-width:1.20796716">
|
||||
<rect
|
||||
y="254.29825"
|
||||
x="7.8681464"
|
||||
height="10.661442"
|
||||
width="57.783382"
|
||||
id="rect4522"
|
||||
style="opacity:1;fill:#f9f9f9;fill-opacity:1;stroke:#000000;stroke-width:0.5110532;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
id="g23">
|
||||
<path
|
||||
style="fill:#f9f9f9;stroke:#000000;stroke-width:0.51105303;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="m 7.868146,254.29825 h 57.783382 v 10.66144 H 7.868146 Z"
|
||||
id="path17" />
|
||||
<text
|
||||
id="text47"
|
||||
y="261.55215"
|
||||
style="font-weight:bold;font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;letter-spacing:0;word-spacing:0;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097;stroke-opacity:0"
|
||||
x="37.113487"
|
||||
style="font-weight:bold;font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0">
|
||||
y="261.55215"
|
||||
id="text21">
|
||||
<tspan
|
||||
y="261.55215"
|
||||
style="stroke-width:0.51097"
|
||||
x="37.113487"
|
||||
id="tspan4512"
|
||||
style="stroke-width:0.51097012">FApplication</tspan>
|
||||
y="261.55215"
|
||||
id="tspan19">FApplication</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.82806766,0,0,0.82760652,25.151866,-0.20330766)"
|
||||
id="g4560"
|
||||
style="stroke-width:1.20796716">
|
||||
<rect
|
||||
y="19.022009"
|
||||
x="15.875"
|
||||
height="10.661442"
|
||||
width="26.458334"
|
||||
id="rect4522-3"
|
||||
style="opacity:1;fill:#f9f9f9;fill-opacity:1;stroke:#000000;stroke-width:0.51105309;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
transform="matrix(0.82806766,0,0,0.82760652,25.151866,-0.203308)"
|
||||
id="g31">
|
||||
<path
|
||||
style="fill:#f9f9f9;stroke:#000000;stroke-width:0.51105303;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="M 15.875,19.022009 H 42.333334 V 29.683451 H 15.875 Z"
|
||||
id="path25" />
|
||||
<text
|
||||
id="text47-6"
|
||||
y="26.275915"
|
||||
style="font-weight:bold;font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;letter-spacing:0;word-spacing:0;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097;stroke-opacity:0"
|
||||
x="29.24534"
|
||||
style="font-weight:bold;font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0">
|
||||
y="26.275915"
|
||||
id="text29">
|
||||
<tspan
|
||||
id="tspan4555"
|
||||
style="stroke-width:0.51097"
|
||||
x="29.24534"
|
||||
y="26.275915"
|
||||
style="stroke-width:0.51097012">FDialog</tspan>
|
||||
id="tspan27">FDialog</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g
|
||||
id="g4560-9"
|
||||
transform="matrix(0.82806766,0,0,0.82760652,38.120716,15.124655)"
|
||||
style="stroke-width:1.20796716">
|
||||
<rect
|
||||
y="19.022009"
|
||||
x="15.875"
|
||||
height="10.661442"
|
||||
width="26.458334"
|
||||
id="rect4522-3-7"
|
||||
style="opacity:1;fill:#f9f9f9;fill-opacity:1;stroke:#000000;stroke-width:0.51105309;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
id="g39">
|
||||
<path
|
||||
style="fill:#f9f9f9;stroke:#000000;stroke-width:0.51105303;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="M 15.875,19.022009 H 42.333334 V 29.683451 H 15.875 Z"
|
||||
id="path33" />
|
||||
<text
|
||||
id="text47-6-3"
|
||||
y="26.275915"
|
||||
style="font-weight:bold;font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;letter-spacing:0;word-spacing:0;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097;stroke-opacity:0"
|
||||
x="29.24534"
|
||||
style="font-weight:bold;font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0">
|
||||
y="26.275915"
|
||||
id="text37">
|
||||
<tspan
|
||||
id="tspan4555-5"
|
||||
style="stroke-width:0.51097"
|
||||
x="29.24534"
|
||||
y="26.275915"
|
||||
style="stroke-width:0.51097012">FDialog</tspan>
|
||||
id="tspan35">FDialog</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g
|
||||
id="g4560-9-0"
|
||||
transform="matrix(0.82806766,0,0,0.82760652,12.006292,15.124655)"
|
||||
style="stroke-width:1.20796716">
|
||||
<rect
|
||||
y="19.022009"
|
||||
x="15.875"
|
||||
height="10.661442"
|
||||
width="26.458334"
|
||||
id="rect4522-3-7-9"
|
||||
style="opacity:1;fill:#f9f9f9;fill-opacity:1;stroke:#000000;stroke-width:0.51105309;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
id="g47">
|
||||
<path
|
||||
style="fill:#f9f9f9;stroke:#000000;stroke-width:0.51105303;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="M 15.875,19.022009 H 42.333334 V 29.683451 H 15.875 Z"
|
||||
id="path41" />
|
||||
<text
|
||||
id="text47-6-3-8"
|
||||
y="26.275915"
|
||||
style="font-weight:bold;font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;letter-spacing:0;word-spacing:0;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097;stroke-opacity:0"
|
||||
x="29.24534"
|
||||
style="font-weight:bold;font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0">
|
||||
y="26.275915"
|
||||
id="text45">
|
||||
<tspan
|
||||
y="26.275915"
|
||||
style="stroke-width:0.51097"
|
||||
x="29.24534"
|
||||
id="tspan4610"
|
||||
style="stroke-width:0.51097012">FLabel</tspan>
|
||||
y="26.275915"
|
||||
id="tspan43">FLabel</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g
|
||||
transform="matrix(0.82806766,0,0,0.82760652,25.151866,-0.20330766)"
|
||||
id="g6273"
|
||||
style="stroke-width:1.20796716">
|
||||
<rect
|
||||
y="56.063679"
|
||||
x="31.75"
|
||||
height="10.661442"
|
||||
width="26.458334"
|
||||
id="rect4522-3-7-8"
|
||||
style="opacity:1;fill:#f9f9f9;fill-opacity:1;stroke:#000000;stroke-width:0.51105309;stroke-linecap:round;stroke-linejoin:round;stroke-miterlimit:4;stroke-dasharray:none;stroke-dashoffset:0;stroke-opacity:1;paint-order:normal" />
|
||||
transform="matrix(0.82806766,0,0,0.82760652,25.151866,-0.203308)"
|
||||
id="g55">
|
||||
<path
|
||||
style="fill:#f9f9f9;stroke:#000000;stroke-width:0.51105303;stroke-linecap:round;stroke-linejoin:round"
|
||||
d="M 31.75,56.063679 H 58.208334 V 66.725121 H 31.75 Z"
|
||||
id="path49" />
|
||||
<text
|
||||
id="text47-6-3-6"
|
||||
y="63.317585"
|
||||
style="font-weight:bold;font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;letter-spacing:0;word-spacing:0;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097;stroke-opacity:0"
|
||||
x="45.120338"
|
||||
style="font-weight:bold;font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0">
|
||||
y="63.317585"
|
||||
id="text53">
|
||||
<tspan
|
||||
id="tspan4555-5-2"
|
||||
style="stroke-width:0.51097"
|
||||
x="45.120338"
|
||||
y="63.317585"
|
||||
style="stroke-width:0.51097012">FButton</tspan>
|
||||
id="tspan51">FListBox</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</g>
|
||||
<text
|
||||
style="font-style:italic;font-weight:bold;font-size:4.08859491px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:center;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.42300001;stroke-opacity:0"
|
||||
style="font-style:italic;font-weight:bold;font-size:4.08859491px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;letter-spacing:0;word-spacing:0;text-anchor:middle;fill:#1a1a1a;stroke-width:0.42300001;stroke-opacity:0"
|
||||
transform="scale(1.0002786,0.99972148)"
|
||||
x="62.287796"
|
||||
y="65.409096"
|
||||
id="text47-6-3-6-5"
|
||||
transform="scale(1.0002786,0.99972148)">
|
||||
id="text61">
|
||||
<tspan
|
||||
style="stroke-width:0.42300001"
|
||||
y="65.409096"
|
||||
x="62.287796"
|
||||
id="tspan4555-5-2-2">etc.</tspan>
|
||||
y="65.409096"
|
||||
id="tspan59">etc.</tspan>
|
||||
</text>
|
||||
<path
|
||||
id="path4648"
|
||||
d="M 49.251306,9.2100164 V 14.9971"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.42306879;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend)"
|
||||
inkscape:connector-curvature="0" />
|
||||
d="m49.251306 9.2100164v5.7870836"
|
||||
fill="none"
|
||||
marker-end="url(#a)"
|
||||
stroke="#000"
|
||||
stroke-width=".423069"
|
||||
id="path63" />
|
||||
<path
|
||||
id="path4648-0"
|
||||
d="m 42.679299,24.537976 v 5.779196"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.42306873;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend-9)"
|
||||
inkscape:connector-curvature="0" />
|
||||
d="m42.679299 24.537976v5.779196"
|
||||
fill="none"
|
||||
marker-end="url(#b)"
|
||||
stroke="#000"
|
||||
stroke-width=".423069"
|
||||
id="path65" />
|
||||
<path
|
||||
id="path4648-0-0"
|
||||
d="m 55.736511,24.537898 v 5.779196"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.42306867;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend-9-7)"
|
||||
inkscape:connector-curvature="0" />
|
||||
d="m55.736511 24.537898v5.779196"
|
||||
fill="none"
|
||||
marker-end="url(#c)"
|
||||
stroke="#000"
|
||||
stroke-width=".423069"
|
||||
id="path67" />
|
||||
<path
|
||||
id="path4648-0-0-7"
|
||||
d="m 62.369882,39.865938 v 5.548839"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.42306867;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend-9-7-1)"
|
||||
inkscape:connector-curvature="0" />
|
||||
d="m62.369882 39.865938v5.548839"
|
||||
fill="none"
|
||||
marker-end="url(#d)"
|
||||
stroke="#000"
|
||||
stroke-width=".423069"
|
||||
id="path69" />
|
||||
<path
|
||||
id="path4648-0-0-7-6"
|
||||
d="m 62.369882,55.193909 v 5.548839"
|
||||
style="fill:none;fill-rule:evenodd;stroke:#000000;stroke-width:0.42306867;stroke-linecap:butt;stroke-linejoin:miter;stroke-miterlimit:4;stroke-dasharray:none;stroke-opacity:1;marker-end:url(#Arrow1Mend-9-7-1-7)"
|
||||
inkscape:connector-curvature="0" />
|
||||
d="m62.369882 55.193909v5.548839"
|
||||
fill="none"
|
||||
marker-end="url(#e)"
|
||||
stroke="#000"
|
||||
stroke-width=".423069"
|
||||
id="path71" />
|
||||
<g
|
||||
transform="matrix(0.82806766,0,0,0.82760652,25.151866,-0.20330766)"
|
||||
id="level"
|
||||
style="stroke-width:1.20796716">
|
||||
style="font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;letter-spacing:0;word-spacing:0;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097;stroke-opacity:0"
|
||||
transform="matrix(0.82806766,0,0,0.82760652,25.151866,-0.203308)"
|
||||
id="g89">
|
||||
<text
|
||||
style="font-weight:normal;font-size:4.93888855px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:left;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0"
|
||||
x="-23.01368"
|
||||
y="8.7182531"
|
||||
id="text47-7">
|
||||
id="text75">
|
||||
<tspan
|
||||
style="stroke-width:0.51097012"
|
||||
id="tspan4512-1"
|
||||
x="-23.01368"
|
||||
y="8.7182531">Parent:</tspan>
|
||||
y="8.7182531"
|
||||
id="tspan73">Parent:</tspan>
|
||||
</text>
|
||||
<text
|
||||
style="font-weight:normal;font-size:4.93888855px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:left;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0"
|
||||
x="-24.412582"
|
||||
y="27.239086"
|
||||
id="text47-7-2">
|
||||
id="text79">
|
||||
<tspan
|
||||
style="stroke-width:0.51097012"
|
||||
id="tspan4512-1-2"
|
||||
x="-24.412582"
|
||||
y="27.239086">Child:</tspan>
|
||||
y="27.239086"
|
||||
id="tspan77">Child:</tspan>
|
||||
</text>
|
||||
<text
|
||||
style="font-weight:normal;font-size:4.93888855px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:left;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0"
|
||||
x="-20.59841"
|
||||
y="44.796837"
|
||||
id="text47-7-0">
|
||||
id="text83">
|
||||
<tspan
|
||||
style="stroke-width:0.51097012"
|
||||
id="tspan4512-1-21"
|
||||
x="-20.59841"
|
||||
y="44.796837">Subchild:</tspan>
|
||||
y="44.796837"
|
||||
id="tspan81">Subchild:</tspan>
|
||||
</text>
|
||||
<text
|
||||
style="font-weight:normal;font-size:4.93888855px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:left;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0"
|
||||
x="-15.852447"
|
||||
y="63.317669"
|
||||
id="text47-7-7">
|
||||
id="text87">
|
||||
<tspan
|
||||
style="stroke-width:0.51097012"
|
||||
id="tspan4512-1-5"
|
||||
x="-15.852447"
|
||||
y="63.317669">Sub-subchild:</tspan>
|
||||
y="63.317669"
|
||||
id="tspan85">Sub-subchild:</tspan>
|
||||
</text>
|
||||
</g>
|
||||
<g
|
||||
id="level-7"
|
||||
transform="matrix(0.82806766,0,0,0.82760652,107.7173,-0.20330766)"
|
||||
style="stroke-width:1.20796716">
|
||||
style="font-size:4.93888903px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;letter-spacing:0;word-spacing:0;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097;stroke-opacity:0"
|
||||
transform="matrix(0.82806766,0,0,0.82760652,107.7173,-0.203308)"
|
||||
id="g107">
|
||||
<text
|
||||
style="font-weight:normal;font-size:4.93888855px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:left;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0"
|
||||
x="-5.0207996"
|
||||
y="8.7182531"
|
||||
id="text47-7-4">
|
||||
<tspan
|
||||
style="stroke-width:0.51097012"
|
||||
id="tspan4512-1-1"
|
||||
x="-5.0208001"
|
||||
y="8.7182531">Application widget (= 1)</tspan>
|
||||
y="8.7182531"
|
||||
id="text93">
|
||||
<tspan
|
||||
x="-5.0208001"
|
||||
y="8.7182531"
|
||||
id="tspan91">Application widget (= 1)</tspan>
|
||||
</text>
|
||||
<text
|
||||
style="font-weight:normal;font-size:4.93888855px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:left;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0"
|
||||
x="-12.021867"
|
||||
y="27.239086"
|
||||
id="text47-7-2-7">
|
||||
id="text97">
|
||||
<tspan
|
||||
style="stroke-width:0.51097012"
|
||||
id="tspan4512-1-2-1"
|
||||
x="-12.021868"
|
||||
y="27.239086">Main widget (= 1)</tspan>
|
||||
y="27.239086"
|
||||
id="tspan95">Main widget (= 1)</tspan>
|
||||
</text>
|
||||
<text
|
||||
style="font-weight:normal;font-size:4.93888855px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:left;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0"
|
||||
x="5.9180651"
|
||||
y="44.796837"
|
||||
id="text47-7-0-1">
|
||||
id="text101">
|
||||
<tspan
|
||||
style="stroke-width:0.51097012"
|
||||
id="tspan4512-1-21-1"
|
||||
x="5.918066"
|
||||
y="44.796837">Widget(s) of the main widget (≥ 0)</tspan>
|
||||
y="44.796837"
|
||||
id="tspan99">Widget(s) of the main widget (≥ 0)</tspan>
|
||||
</text>
|
||||
<text
|
||||
style="font-weight:normal;font-size:4.93888855px;font-family:FreeSans, Arial, 'Bitstream Vera Sans', 'DejaVu Sans', 'Open Sans', sans-serif;font-variant-ligatures:normal;font-variant-caps:normal;font-variant-numeric:normal;font-feature-settings:normal;text-align:left;letter-spacing:0;word-spacing:0;writing-mode:lr-tb;text-anchor:middle;fill:#1a1a1a;stroke-width:0.51097012;stroke-opacity:0"
|
||||
x="10.413227"
|
||||
y="63.317669"
|
||||
id="text47-7-7-7">
|
||||
id="text105">
|
||||
<tspan
|
||||
style="stroke-width:0.51097012"
|
||||
id="tspan4512-1-5-0"
|
||||
x="10.413226"
|
||||
y="63.317669">Widget(s) from the parent widget (≥ 0)</tspan>
|
||||
y="63.317669"
|
||||
id="tspan103">Widget(s) from the parent widget (≥ 0)</tspan>
|
||||
</text>
|
||||
</g>
|
||||
</svg>
|
||||
|
|
Before Width: | Height: | Size: 18 KiB After Width: | Height: | Size: 9.5 KiB |
|
@ -27,7 +27,7 @@ class myWidgetColors final : public finalcut::FWidgetColors
|
|||
~myWidgetColors() override
|
||||
{ }
|
||||
|
||||
const finalcut::FString getClassName() const override
|
||||
finalcut::FString getClassName() const override
|
||||
{
|
||||
return "myWidgetColors";
|
||||
}
|
||||
|
@ -68,7 +68,7 @@ class BeeColorTheme final : public finalcut::FWidgetColors
|
|||
~BeeColorTheme() override
|
||||
{ }
|
||||
|
||||
const finalcut::FString getClassName() const override
|
||||
finalcut::FString getClassName() const override
|
||||
{
|
||||
return "BeeColorTheme";
|
||||
}
|
||||
|
@ -216,7 +216,7 @@ class myColorPalette final : public finalcut::FColorPalette
|
|||
~myColorPalette()
|
||||
{ }
|
||||
|
||||
const finalcut::FString getClassName() const override
|
||||
finalcut::FString getClassName() const override
|
||||
{
|
||||
return "myColorPalette";
|
||||
}
|
||||
|
@ -299,7 +299,7 @@ class BeeColorPalette final : public finalcut::FColorPalette
|
|||
~BeeColorPalette()
|
||||
{ }
|
||||
|
||||
const finalcut::FString getClassName() const override
|
||||
finalcut::FString getClassName() const override
|
||||
{
|
||||
return "BeeColorPalette";
|
||||
}
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* <http://www.gnu.org/licenses/>. *
|
||||
***********************************************************************/
|
||||
|
||||
#include <array>
|
||||
#include <map>
|
||||
#include <vector>
|
||||
|
||||
|
@ -39,9 +40,6 @@ using finalcut::FSize;
|
|||
class SegmentView final : public finalcut::FDialog
|
||||
{
|
||||
public:
|
||||
// Using-declaration
|
||||
using FDialog::setGeometry;
|
||||
|
||||
// Constructor
|
||||
explicit SegmentView (finalcut::FWidget* = nullptr);
|
||||
|
||||
|
@ -64,10 +62,9 @@ class SegmentView final : public finalcut::FDialog
|
|||
void get7Segment (const wchar_t);
|
||||
void draw() override;
|
||||
|
||||
|
||||
// Data members
|
||||
std::map<wchar_t, sevenSegment> code{};
|
||||
finalcut::FString line[3]{};
|
||||
std::array<finalcut::FString, 3> line{};
|
||||
finalcut::FLineEdit input{"0123", this};
|
||||
finalcut::FButton exit{"E&xit", this};
|
||||
};
|
||||
|
@ -140,7 +137,7 @@ void SegmentView::hexEncoding()
|
|||
//----------------------------------------------------------------------
|
||||
void SegmentView::get7Segment (const wchar_t c)
|
||||
{
|
||||
for (int i{0}; i < 3; i++)
|
||||
for (std::size_t i{0}; i < 3; i++)
|
||||
line[i].clear();
|
||||
|
||||
switch ( c )
|
||||
|
@ -186,8 +183,8 @@ void SegmentView::get7Segment (const wchar_t c)
|
|||
if ( code.find(c) != code.end() )
|
||||
{
|
||||
const sevenSegment& s = code[c];
|
||||
constexpr char h[2]{' ', '_'};
|
||||
constexpr char v[2]{' ', '|'};
|
||||
constexpr std::array<char, 2> h{{' ', '_'}};
|
||||
constexpr std::array<char, 2> v{{' ', '|'}};
|
||||
|
||||
line[0] << ' ' << h[s.a] << ' ';
|
||||
line[1] << v[s.f] << h[s.g] << v[s.b];
|
||||
|
|
|
@ -38,9 +38,6 @@ using finalcut::FSize;
|
|||
class Background final : public finalcut::FDialog
|
||||
{
|
||||
public:
|
||||
// Using-declaration
|
||||
using FDialog::setGeometry;
|
||||
|
||||
// Typedef
|
||||
typedef std::tuple<uChar, uChar, uChar> RGB;
|
||||
|
||||
|
|
|
@ -23,6 +23,7 @@
|
|||
#include <cfloat>
|
||||
#include <cmath>
|
||||
#include <cstdlib>
|
||||
#include <array>
|
||||
#include <limits>
|
||||
#include <map>
|
||||
#include <memory>
|
||||
|
@ -231,7 +232,7 @@ class Calc final : public finalcut::FDialog
|
|||
char infix_operator{'\0'};
|
||||
char last_infix_operator{'\0'};
|
||||
finalcut::FString input{""};
|
||||
button button_no[Calc::NUM_OF_BUTTONS]{};
|
||||
std::array<button, Calc::NUM_OF_BUTTONS> button_no{};
|
||||
|
||||
struct StackData
|
||||
{
|
||||
|
@ -950,8 +951,8 @@ void Calc::draw()
|
|||
bool Calc::isDataEntryKey (int key) const
|
||||
{
|
||||
// Test if key is in {'.', '0'..'9'}
|
||||
const int data_entry_keys[] =
|
||||
{
|
||||
constexpr std::array<int, 11> key_list =
|
||||
{{
|
||||
Decimal_point,
|
||||
Zero,
|
||||
One,
|
||||
|
@ -963,11 +964,11 @@ bool Calc::isDataEntryKey (int key) const
|
|||
Seven,
|
||||
Eight,
|
||||
Nine
|
||||
};
|
||||
}};
|
||||
|
||||
const int* iter = std::find (data_entry_keys, data_entry_keys + 11, key);
|
||||
const auto& iter = std::find (key_list.begin(), key_list.end(), key);
|
||||
|
||||
if ( iter != data_entry_keys + 11 )
|
||||
if ( iter != key_list.end() )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
@ -977,19 +978,19 @@ bool Calc::isDataEntryKey (int key) const
|
|||
bool Calc::isOperatorKey(int key) const
|
||||
{
|
||||
// Test if key is in {'*', '/', '+', '-', '^', '='}
|
||||
const int operators[] =
|
||||
{
|
||||
constexpr std::array<int, 6> operators =
|
||||
{{
|
||||
Multiply,
|
||||
Divide,
|
||||
Add,
|
||||
Subtract,
|
||||
Power,
|
||||
Equals
|
||||
};
|
||||
}};
|
||||
|
||||
const int* iter = std::find (operators, operators + 6, key);
|
||||
const auto& iter = std::find (operators.begin(), operators.end(), key);
|
||||
|
||||
if ( iter != operators + 6 )
|
||||
if ( iter != operators.end() )
|
||||
return true;
|
||||
else
|
||||
return false;
|
||||
|
@ -1099,8 +1100,8 @@ void Calc::adjustSize()
|
|||
//----------------------------------------------------------------------
|
||||
const wchar_t* Calc::getButtonText (const std::size_t key) const
|
||||
{
|
||||
static const wchar_t* const button_text[Calc::NUM_OF_BUTTONS] =
|
||||
{
|
||||
constexpr std::array<const wchar_t*, Calc::NUM_OF_BUTTONS> button_text =
|
||||
{{
|
||||
L"&Sin",
|
||||
L"&Cos",
|
||||
L"&Tan",
|
||||
|
@ -1135,7 +1136,7 @@ const wchar_t* Calc::getButtonText (const std::size_t key) const
|
|||
L"&.",
|
||||
L"&±",
|
||||
L"&="
|
||||
};
|
||||
}};
|
||||
|
||||
return button_text[key];
|
||||
}
|
||||
|
|
|
@ -58,6 +58,7 @@ class CheckList final : public finalcut::FDialog
|
|||
private:
|
||||
// Method
|
||||
void populate();
|
||||
void adjustSize() override;
|
||||
|
||||
// Event handlers
|
||||
void onKeyPress (finalcut::FKeyEvent*) override;
|
||||
|
@ -80,8 +81,7 @@ CheckList::CheckList (finalcut::FWidget* parent)
|
|||
// (CERT, OOP50-CPP)
|
||||
FDialog::setText (L"Shopping list");
|
||||
const std::size_t nf_offset = ( finalcut::FTerm::isNewFont() ) ? 1 : 0;
|
||||
FDialog::setGeometry ( FPoint{int(1 + (parent->getWidth() - 28) / 2), 5}
|
||||
, FSize{28 + nf_offset, 13} );
|
||||
FDialog::setSize (FSize{28 + nf_offset, 13} );
|
||||
setShadow();
|
||||
listview.ignorePadding();
|
||||
listview.setGeometry ( FPoint{1 + int(nf_offset), 2}
|
||||
|
@ -121,29 +121,36 @@ CheckList::~CheckList() // destructor
|
|||
//----------------------------------------------------------------------
|
||||
void CheckList::populate()
|
||||
{
|
||||
const std::string list[][2] =
|
||||
{
|
||||
{ "Milk", "Highest" },
|
||||
{ "Cheese", "High" },
|
||||
{ "Yoghurt", "Medium" },
|
||||
{ "Bread", "Low" },
|
||||
{ "Eggs", "High" },
|
||||
{ "Toothpaste", "Medium" },
|
||||
{ "Apples", "Lowest" },
|
||||
{ "Bananas", "Medium" },
|
||||
{ "Fish", "Medium" },
|
||||
{ "Lemons", "Low" }
|
||||
};
|
||||
constexpr std::array<std::array<const char*, 2>, 10> list =
|
||||
{{
|
||||
{{ "Milk", "Highest" }},
|
||||
{{ "Cheese", "High" }},
|
||||
{{ "Yoghurt", "Medium" }},
|
||||
{{ "Bread", "Low" }},
|
||||
{{ "Eggs", "High" }},
|
||||
{{ "Toothpaste", "Medium" }},
|
||||
{{ "Apples", "Lowest" }},
|
||||
{{ "Bananas", "Medium" }},
|
||||
{{ "Fish", "Medium" }},
|
||||
{{ "Lemons", "Low" }}
|
||||
}};
|
||||
|
||||
for (const auto& line : list)
|
||||
{
|
||||
const finalcut::FStringList string_line (&line[0], &line[0] + 2);
|
||||
const finalcut::FStringList string_line (line.begin(), line.end());
|
||||
auto iter = listview.insert (string_line);
|
||||
auto item = static_cast<finalcut::FListViewItem*>(*iter);
|
||||
item->setCheckable(true);
|
||||
}
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void CheckList::adjustSize()
|
||||
{
|
||||
finalcut::FDialog::adjustSize();
|
||||
setPos(FPoint{int(1 + (getDesktopWidth() - getWidth()) / 2), 5});
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void CheckList::onKeyPress (finalcut::FKeyEvent* ev)
|
||||
{
|
||||
|
|
|
@ -51,7 +51,7 @@ class EventDialog final : public finalcut::FDialog
|
|||
EventDialog (const EventDialog&) = delete;
|
||||
|
||||
// Destructor
|
||||
~EventDialog();
|
||||
~EventDialog() override;
|
||||
|
||||
// Disable copy assignment operator (=)
|
||||
EventDialog& operator = (const EventDialog&) = delete;
|
||||
|
@ -245,7 +245,7 @@ class EventLog final : public finalcut::FDialog, public std::ostringstream
|
|||
EventLog (const EventLog&) = delete;
|
||||
|
||||
// Destructor
|
||||
~EventLog();
|
||||
~EventLog() override;
|
||||
|
||||
// Disable copy assignment operator (=)
|
||||
EventLog& operator = (const EventLog&) = delete;
|
||||
|
|
|
@ -130,54 +130,54 @@ Listview::~Listview() // destructor
|
|||
//----------------------------------------------------------------------
|
||||
void Listview::populate()
|
||||
{
|
||||
const std::string weather[][5] =
|
||||
{
|
||||
{ "Alexandria", "Sunny", "31°C", "61%", "1006.4 mb" },
|
||||
{ "Amsterdam", "Cloudy", "21°C", "82%", "1021.3 mb" },
|
||||
{ "Baghdad", "Fair", "47°C", "9%", "1001.0 mb" },
|
||||
{ "Bangkok", "Partly Cloudy", "30°C", "69%", "1002.0 mb" },
|
||||
{ "Beijing", "Fair", "31°C", "68%", "1007.1 mb" },
|
||||
{ "Berlin", "Cloudy", "22°C", "53%", "1022.0 mb" },
|
||||
{ "Bogotá", "Fair", "9°C", "95%", "1028.5 mb" },
|
||||
{ "Budapest", "Partly Cloudy", "23°C", "37%", "1020.7 mb" },
|
||||
{ "Buenos Aires", "Cloudy", "7°C", "73%", "1019.0 mb" },
|
||||
{ "Cairo", "Fair", "39°C", "22%", "1006.1 mb" },
|
||||
{ "Cape Town", "Partly Cloudy", "12°C", "45%", "1030.1 mb" },
|
||||
{ "Chicago", "Mostly Cloudy", "21°C", "81%", "1014.9 mb" },
|
||||
{ "Delhi", "Haze", "33°C", "68%", "998.0 mb" },
|
||||
{ "Dhaka", "Haze", "32°C", "64%", "996.3 mb" },
|
||||
{ "Houston", "Cloudy", "23°C", "100%", "1014.2 mb" },
|
||||
{ "Istanbul", "Mostly Cloudy", "27°C", "61%", "1011.2 mb" },
|
||||
{ "Jakarta", "Fair", "28°C", "71%", "1009.1 mb" },
|
||||
{ "Jerusalem", "Sunny", "35°C", "17%", "1005.8 mb" },
|
||||
{ "Johannesburg", "Fair", "18°C", "16%", "1020.0 mb" },
|
||||
{ "Karachi", "Mostly Cloudy", "29°C", "76%", "998.0 mb" },
|
||||
{ "Lagos", "Mostly Cloudy", "27°C", "86%", "1014.6 mb" },
|
||||
{ "Lima", "Cloudy", "17°C", "83%", "1017.3 mb" },
|
||||
{ "London", "Cloudy", "23°C", "71%", "1023.0 mb" },
|
||||
{ "Los Angeles", "Fair", "21°C", "78%", "1011.9 mb" },
|
||||
{ "Madrid", "Fair", "32°C", "35%", "1020.0 mb" },
|
||||
{ "Mexico City", "Partly Cloudy", "14°C", "79%", "1028.5 mb" },
|
||||
{ "Moscow", "Partly Cloudy", "24°C", "54%", "1014.2 mb" },
|
||||
{ "Mumbai", "Haze", "28°C", "77%", "1003.0 mb" },
|
||||
{ "New York City", "Sunny", "21°C", "80%", "1014.2 mb" },
|
||||
{ "Paris", "Partly Cloudy", "27°C", "57%", "1024.4 mb" },
|
||||
{ "Reykjavík", "Mostly Cloudy", "11°C", "76%", "998.6 mb" },
|
||||
{ "Rio de Janeiro", "Fair", "24°C", "64%", "1022.0 mb" },
|
||||
{ "Rome", "Fair", "32°C", "18%", "1014.2 mb" },
|
||||
{ "Saint Petersburg", "Mostly Cloudy", "18°C", "55%", "1014.6 mb" },
|
||||
{ "São Paulo", "Fair", "19°C", "53%", "1024.0 mb" },
|
||||
{ "Seoul", "Cloudy", "26°C", "87%", "1012.2 mb" },
|
||||
{ "Shanghai", "Fair", "32°C", "69%", "1009.1 mb" },
|
||||
{ "Singapore", "Mostly Cloudy", "29°C", "73%", "1009.1 mb" },
|
||||
{ "Tehran", "Fair", "36°C", "14%", "1013.2 mb" },
|
||||
{ "Tokyo", "Mostly Cloudy", "28°C", "67%", "1009.1 mb" },
|
||||
{ "Zurich", "Mostly Cloudy", "23°C", "44%", "1023.7 mb" }
|
||||
};
|
||||
constexpr std::array<std::array<const char*, 5>, 41> weather =
|
||||
{{
|
||||
{{ "Alexandria", "Sunny", "31°C", "61%", "1006.4 mb" }},
|
||||
{{ "Amsterdam", "Cloudy", "21°C", "82%", "1021.3 mb" }},
|
||||
{{ "Baghdad", "Fair", "47°C", "9%", "1001.0 mb" }},
|
||||
{{ "Bangkok", "Partly Cloudy", "30°C", "69%", "1002.0 mb" }},
|
||||
{{ "Beijing", "Fair", "31°C", "68%", "1007.1 mb" }},
|
||||
{{ "Berlin", "Cloudy", "22°C", "53%", "1022.0 mb" }},
|
||||
{{ "Bogotá", "Fair", "9°C", "95%", "1028.5 mb" }},
|
||||
{{ "Budapest", "Partly Cloudy", "23°C", "37%", "1020.7 mb" }},
|
||||
{{ "Buenos Aires", "Cloudy", "7°C", "73%", "1019.0 mb" }},
|
||||
{{ "Cairo", "Fair", "39°C", "22%", "1006.1 mb" }},
|
||||
{{ "Cape Town", "Partly Cloudy", "12°C", "45%", "1030.1 mb" }},
|
||||
{{ "Chicago", "Mostly Cloudy", "21°C", "81%", "1014.9 mb" }},
|
||||
{{ "Delhi", "Haze", "33°C", "68%", "998.0 mb" }},
|
||||
{{ "Dhaka", "Haze", "32°C", "64%", "996.3 mb" }},
|
||||
{{ "Houston", "Cloudy", "23°C", "100%", "1014.2 mb" }},
|
||||
{{ "Istanbul", "Mostly Cloudy", "27°C", "61%", "1011.2 mb" }},
|
||||
{{ "Jakarta", "Fair", "28°C", "71%", "1009.1 mb" }},
|
||||
{{ "Jerusalem", "Sunny", "35°C", "17%", "1005.8 mb" }},
|
||||
{{ "Johannesburg", "Fair", "18°C", "16%", "1020.0 mb" }},
|
||||
{{ "Karachi", "Mostly Cloudy", "29°C", "76%", "998.0 mb" }},
|
||||
{{ "Lagos", "Mostly Cloudy", "27°C", "86%", "1014.6 mb" }},
|
||||
{{ "Lima", "Cloudy", "17°C", "83%", "1017.3 mb" }},
|
||||
{{ "London", "Cloudy", "23°C", "71%", "1023.0 mb" }},
|
||||
{{ "Los Angeles", "Fair", "21°C", "78%", "1011.9 mb" }},
|
||||
{{ "Madrid", "Fair", "32°C", "35%", "1020.0 mb" }},
|
||||
{{ "Mexico City", "Partly Cloudy", "14°C", "79%", "1028.5 mb" }},
|
||||
{{ "Moscow", "Partly Cloudy", "24°C", "54%", "1014.2 mb" }},
|
||||
{{ "Mumbai", "Haze", "28°C", "77%", "1003.0 mb" }},
|
||||
{{ "New York City", "Sunny", "21°C", "80%", "1014.2 mb" }},
|
||||
{{ "Paris", "Partly Cloudy", "27°C", "57%", "1024.4 mb" }},
|
||||
{{ "Reykjavík", "Mostly Cloudy", "11°C", "76%", "998.6 mb" }},
|
||||
{{ "Rio de Janeiro", "Fair", "24°C", "64%", "1022.0 mb" }},
|
||||
{{ "Rome", "Fair", "32°C", "18%", "1014.2 mb" }},
|
||||
{{ "Saint Petersburg", "Mostly Cloudy", "18°C", "55%", "1014.6 mb" }},
|
||||
{{ "São Paulo", "Fair", "19°C", "53%", "1024.0 mb" }},
|
||||
{{ "Seoul", "Cloudy", "26°C", "87%", "1012.2 mb" }},
|
||||
{{ "Shanghai", "Fair", "32°C", "69%", "1009.1 mb" }},
|
||||
{{ "Singapore", "Mostly Cloudy", "29°C", "73%", "1009.1 mb" }},
|
||||
{{ "Tehran", "Fair", "36°C", "14%", "1013.2 mb" }},
|
||||
{{ "Tokyo", "Mostly Cloudy", "28°C", "67%", "1009.1 mb" }},
|
||||
{{ "Zurich", "Mostly Cloudy", "23°C", "44%", "1023.7 mb" }}
|
||||
}};
|
||||
|
||||
for (const auto& place : weather)
|
||||
{
|
||||
const finalcut::FStringList line (&place[0], &place[0] + 5);
|
||||
const finalcut::FStringList line (place.begin(), place.end());
|
||||
listview.insert (line);
|
||||
}
|
||||
}
|
||||
|
@ -197,7 +197,10 @@ void Listview::cb_showInMessagebox()
|
|||
"Temperature: " + item->getText(3) + "\n"
|
||||
" Humidity: " + item->getText(4) + "\n"
|
||||
" Pressure: " + item->getText(5)
|
||||
, finalcut::FMessageBox::Ok, 0, 0, this );
|
||||
, finalcut::FMessageBox::Ok
|
||||
, finalcut::FMessageBox::Reject
|
||||
, finalcut::FMessageBox::Reject
|
||||
, this );
|
||||
info.show();
|
||||
}
|
||||
|
||||
|
|
|
@ -75,8 +75,8 @@ void Mandelbrot::draw()
|
|||
|
||||
const int xoffset{2};
|
||||
const int yoffset{2};
|
||||
const int Cols = int(getClientWidth());
|
||||
const int Lines = int(getClientHeight());
|
||||
const auto Cols = int(getClientWidth());
|
||||
const auto Lines = int(getClientHeight());
|
||||
int current_line{0};
|
||||
|
||||
if ( Cols < 2 || Lines < 2 )
|
||||
|
|
|
@ -291,8 +291,8 @@ void Menu::defaultCallback (const finalcut::FMenuList* mb)
|
|||
//----------------------------------------------------------------------
|
||||
void Menu::adjustSize()
|
||||
{
|
||||
const int pw = int(getDesktopWidth());
|
||||
const int ph = int(getDesktopHeight());
|
||||
const auto pw = int(getDesktopWidth());
|
||||
const auto ph = int(getDesktopHeight());
|
||||
setX (1 + (pw - int(getWidth())) / 2, false);
|
||||
setY (1 + (ph - int(getHeight())) / 4, false);
|
||||
finalcut::FDialog::adjustSize();
|
||||
|
@ -327,8 +327,7 @@ int main (int argc, char* argv[])
|
|||
// Create main dialog object
|
||||
Menu main_dlg {&app};
|
||||
main_dlg.setText ("Menu example");
|
||||
main_dlg.setGeometry ( FPoint{int(1 + (app.getWidth() - 40) / 2), 2}
|
||||
, FSize{40, 6} );
|
||||
main_dlg.setSize ({40, 6});
|
||||
main_dlg.setShadow();
|
||||
|
||||
// Set dialog main_dlg as main widget
|
||||
|
|
|
@ -537,8 +537,8 @@ void MouseDraw::adjustSize()
|
|||
{
|
||||
const std::size_t w{60};
|
||||
const std::size_t h{18};
|
||||
const int x = 1 + int((getParentWidget()->getWidth() - w) / 2);
|
||||
const int y = 1 + int((getParentWidget()->getHeight() - h) / 2);
|
||||
const int x = 1 + int((getDesktopWidth() - w) / 2);
|
||||
const int y = 1 + int((getDesktopHeight() - h) / 2);
|
||||
setGeometry (FPoint{x, y}, FSize{w, h}, false);
|
||||
finalcut::FDialog::adjustSize();
|
||||
}
|
||||
|
@ -590,7 +590,6 @@ int main (int argc, char* argv[])
|
|||
|
||||
// Create a simple dialog box
|
||||
MouseDraw mouse_draw{&app};
|
||||
mouse_draw.setGeometry (FPoint{12, 4}, FSize{60, 18});
|
||||
|
||||
// Set dialog object mouse_draw as main widget
|
||||
finalcut::FWidget::setMainWidget(&mouse_draw);
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* <http://www.gnu.org/licenses/>. *
|
||||
***********************************************************************/
|
||||
|
||||
#include <array>
|
||||
#include <iomanip>
|
||||
#include <memory>
|
||||
#include <string>
|
||||
|
@ -93,14 +94,15 @@ void move (int xold, int yold, int xnew, int ynew)
|
|||
finalcut::FString from{};
|
||||
finalcut::FString to{};
|
||||
finalcut::FString byte{};
|
||||
const std::string ctrl_character[] =
|
||||
{
|
||||
|
||||
constexpr std::array<const char*, 33> ctrl_character =
|
||||
{{
|
||||
"NUL", "SOH", "STX", "ETX", "EOT", "ENQ", "ACK", "BEL",
|
||||
"BS", "Tab", "LF", "VT", "FF", "CR", "SO", "SI",
|
||||
"DLE", "DC1", "DC2", "DC3", "DC4", "NAK", "SYN", "ETB",
|
||||
"CAN", "EM", "SUB", "Esc", "FS", "GS", "RS", "US",
|
||||
"Space"
|
||||
};
|
||||
}};
|
||||
|
||||
term_boundaries(xold, yold);
|
||||
term_boundaries(xnew, ynew);
|
||||
|
@ -209,8 +211,11 @@ DirectLogger::~DirectLogger() // destructor
|
|||
//----------------------------------------------------------------------
|
||||
int main (int argc, char* argv[])
|
||||
{
|
||||
// Disable mouse
|
||||
finalcut::FStartOptions::getFStartOptions().mouse_support = false;
|
||||
// Disable mouse, color palette changes and terminal data requests
|
||||
auto& start_options = finalcut::FStartOptions::getFStartOptions();
|
||||
start_options.mouse_support = false;
|
||||
start_options.color_change = false;
|
||||
start_options.terminal_data_request = false;
|
||||
|
||||
// Create the application object
|
||||
finalcut::FApplication term_app{argc, argv};
|
||||
|
|
|
@ -226,7 +226,7 @@ void RotoZoomer::onShow (finalcut::FShowEvent*)
|
|||
end = system_clock::now();
|
||||
generateReport();
|
||||
flush();
|
||||
quit();
|
||||
close();
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -261,7 +261,9 @@ void RotoZoomer::onKeyPress (finalcut::FKeyEvent* ev)
|
|||
//----------------------------------------------------------------------
|
||||
void RotoZoomer::onClose (finalcut::FCloseEvent* ev)
|
||||
{
|
||||
if ( ! benchmark )
|
||||
if ( benchmark )
|
||||
ev->accept();
|
||||
else
|
||||
finalcut::FApplication::closeConfirmationDialog (this, ev);
|
||||
}
|
||||
|
||||
|
@ -305,6 +307,9 @@ int main (int argc, char* argv[])
|
|||
|| strcmp(argv[1], "-b") == 0 ) )
|
||||
{
|
||||
benchmark = true;
|
||||
// Disable terminal data requests
|
||||
auto& start_options = finalcut::FStartOptions::getFStartOptions();
|
||||
start_options.terminal_data_request = false;
|
||||
}
|
||||
|
||||
{ // Create the application object in this scope
|
||||
|
@ -317,8 +322,6 @@ int main (int argc, char* argv[])
|
|||
|
||||
if ( benchmark )
|
||||
roto.setGeometry (FPoint{1, 1}, FSize{80, 24});
|
||||
else
|
||||
roto.setGeometry (FPoint{5, 1}, FSize{72, 23});
|
||||
|
||||
roto.setShadow();
|
||||
|
||||
|
|
|
@ -63,7 +63,7 @@ class AttribDlg final : public finalcut::FDialog
|
|||
|
||||
private:
|
||||
// Constants
|
||||
static constexpr FColor UNDEFINED = static_cast<FColor>(-2);
|
||||
static constexpr auto UNDEFINED = static_cast<FColor>(-2);
|
||||
|
||||
// Method
|
||||
void adjustSize() override;
|
||||
|
@ -498,8 +498,7 @@ int main (int argc, char* argv[])
|
|||
// This object will be automatically deleted by
|
||||
// the parent object "app" (FObject destructor).
|
||||
AttribDlg dialog{&app};
|
||||
|
||||
dialog.setGeometry (FPoint{6, 2}, FSize{69, 21});
|
||||
dialog.setSize (FSize{69, 21});
|
||||
dialog.setShadow();
|
||||
|
||||
// Create the attribute demo widget as a child object from the dialog
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* <http://www.gnu.org/licenses/>. *
|
||||
***********************************************************************/
|
||||
|
||||
#include <array>
|
||||
#include <iomanip>
|
||||
#include <iostream>
|
||||
#include <string>
|
||||
|
@ -50,14 +51,14 @@ struct Data
|
|||
const fc::termcaps cap;
|
||||
};
|
||||
|
||||
static TermcapString strings[];
|
||||
static std::array<TermcapString, 83> strings;
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// struct data - string data array
|
||||
//----------------------------------------------------------------------
|
||||
Data::TermcapString Data::strings[] =
|
||||
{
|
||||
std::array<Data::TermcapString, 83> Data::strings =
|
||||
{{
|
||||
{ "t_bell", fc::t_bell },
|
||||
{ "t_erase_chars", fc::t_erase_chars },
|
||||
{ "t_clear_screen", fc::t_clear_screen },
|
||||
|
@ -99,6 +100,7 @@ Data::TermcapString Data::strings[] =
|
|||
{ "t_parm_right_cursor", fc::t_parm_right_cursor },
|
||||
{ "t_save_cursor", fc::t_save_cursor },
|
||||
{ "t_restore_cursor", fc::t_restore_cursor },
|
||||
{ "t_cursor_style", fc::t_cursor_style },
|
||||
{ "t_scroll_forward", fc::t_scroll_forward },
|
||||
{ "t_scroll_reverse", fc::t_scroll_reverse },
|
||||
{ "t_enter_ca_mode", fc::t_enter_ca_mode },
|
||||
|
@ -140,7 +142,7 @@ Data::TermcapString Data::strings[] =
|
|||
{ "t_keypad_xmit", fc::t_keypad_xmit },
|
||||
{ "t_keypad_local", fc::t_keypad_local },
|
||||
{ "t_key_mouse", fc::t_key_mouse }
|
||||
};
|
||||
}};
|
||||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -174,11 +176,11 @@ void tcapString (const std::string& name, const char cap_str[])
|
|||
return;
|
||||
}
|
||||
|
||||
const uInt len = uInt(std::strlen(cap_str));
|
||||
const auto len = uInt(std::strlen(cap_str));
|
||||
|
||||
for (uInt i{0}; i < len; i++)
|
||||
{
|
||||
const uChar c = uChar(cap_str[i]);
|
||||
const auto c = uChar(cap_str[i]);
|
||||
|
||||
if ( c > 127 )
|
||||
{
|
||||
|
@ -282,8 +284,7 @@ void numeric()
|
|||
void string()
|
||||
{
|
||||
std::cout << "\r\n[String]\r\n";
|
||||
const finalcut::FTermcap::tcap_map (&tcap_strings)[] \
|
||||
= finalcut::FTermcap::strings;
|
||||
const auto& tcap_strings = finalcut::FTermcap::strings;
|
||||
|
||||
for (const auto& entry : Data::strings)
|
||||
{
|
||||
|
|
|
@ -256,12 +256,11 @@ void MainWindow::onShow (finalcut::FShowEvent*)
|
|||
//----------------------------------------------------------------------
|
||||
void MainWindow::onTimer (finalcut::FTimerEvent*)
|
||||
{
|
||||
wchar_t first_char[2];
|
||||
std::size_t length = line1.getLength();
|
||||
first_char[0] = line1[0];
|
||||
first_char[1] = line2[0];
|
||||
line1 = line1.right(length - 1) + first_char[0];
|
||||
line2 = line2.right(length - 1) + first_char[1];
|
||||
const wchar_t first_char1 = line1[0];
|
||||
const wchar_t first_char2 = line2[0];
|
||||
line1 = line1.right(length - 1) + first_char1;
|
||||
line2 = line2.right(length - 1) + first_char2;
|
||||
redraw();
|
||||
flush();
|
||||
}
|
||||
|
|
|
@ -401,6 +401,8 @@ Treeview::~Treeview() // destructor
|
|||
//----------------------------------------------------------------------
|
||||
void Treeview::adjustSize()
|
||||
{
|
||||
finalcut::FDialog::adjustSize();
|
||||
|
||||
std::size_t h = getDesktopHeight() - 4;
|
||||
setHeight (h, false);
|
||||
int x = int((getDesktopWidth() - getWidth()) / 2);
|
||||
|
@ -408,15 +410,13 @@ void Treeview::adjustSize()
|
|||
if ( x < 1 )
|
||||
x = 1;
|
||||
|
||||
setX (x, false);
|
||||
setPos (FPoint{x, 3}, false);
|
||||
|
||||
if ( initialized )
|
||||
{
|
||||
listview.setHeight (getHeight() - 6, false);
|
||||
listview.setHeight (getHeight() - 6, true);
|
||||
quit.setY(int(getHeight()) - 4);
|
||||
}
|
||||
|
||||
finalcut::FDialog::adjustSize();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -438,8 +438,7 @@ int main (int argc, char* argv[])
|
|||
// Create main dialog object
|
||||
Treeview d{&app};
|
||||
d.setText (L"Continents");
|
||||
d.setGeometry ( FPoint{int(1 + (app.getWidth() - 57) / 2), 3}
|
||||
, FSize{57, 20} );
|
||||
d.setSize (FSize{57, 20});
|
||||
d.setShadow();
|
||||
|
||||
// Set dialog d as main widget
|
||||
|
|
|
@ -782,19 +782,19 @@ void MyDialog::initWidgetsCallbacks()
|
|||
//----------------------------------------------------------------------
|
||||
void MyDialog::adjustSize()
|
||||
{
|
||||
const auto h = getParentWidget()->getHeight() - 4;
|
||||
finalcut::FDialog::adjustSize();
|
||||
|
||||
const auto h = getDesktopHeight() - 4;
|
||||
setHeight (h, false);
|
||||
int x = int((getDesktopWidth() - getWidth()) / 2);
|
||||
auto x = int((getDesktopWidth() - getWidth()) / 2);
|
||||
|
||||
if ( x < 1 )
|
||||
x = 1;
|
||||
|
||||
setX (x, false);
|
||||
setPos (FPoint{x, 2}, false);
|
||||
|
||||
if ( initialized )
|
||||
myList.setHeight (getHeight() - 3, false);
|
||||
|
||||
finalcut::FDialog::adjustSize();
|
||||
myList.setHeight (getHeight() - 3, true);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -823,7 +823,10 @@ void MyDialog::cb_about()
|
|||
, line + L" FINAL CUT " + line + L"\n\n"
|
||||
L"Version " + libver + L"\n\n"
|
||||
L"(c) 2020 by Markus Gans"
|
||||
, finalcut::FMessageBox::Ok, 0, 0, this );
|
||||
, finalcut::FMessageBox::Ok
|
||||
, finalcut::FMessageBox::Reject
|
||||
, finalcut::FMessageBox::Reject
|
||||
, this );
|
||||
info.setCenterText();
|
||||
info.show();
|
||||
}
|
||||
|
@ -843,7 +846,10 @@ void MyDialog::cb_terminfo()
|
|||
<< " Size: " << x << fc::Times
|
||||
<< y << "\n"
|
||||
<< "Colors: " << finalcut::FTerm::getMaxColor()
|
||||
, finalcut::FMessageBox::Ok, 0, 0, this
|
||||
, finalcut::FMessageBox::Ok
|
||||
, finalcut::FMessageBox::Reject
|
||||
, finalcut::FMessageBox::Reject
|
||||
, this
|
||||
);
|
||||
info1.setHeadline("Terminal:");
|
||||
info1.exec();
|
||||
|
@ -858,7 +864,10 @@ void MyDialog::cb_drives()
|
|||
, "Generic: \n\n"
|
||||
"Network: \n\n"
|
||||
" CD:"
|
||||
, finalcut::FMessageBox::Ok, 0, 0, this
|
||||
, finalcut::FMessageBox::Ok
|
||||
, finalcut::FMessageBox::Reject
|
||||
, finalcut::FMessageBox::Reject
|
||||
, this
|
||||
);
|
||||
|
||||
if ( finalcut::FTerm::isNewFont() )
|
||||
|
@ -1057,8 +1066,7 @@ int main (int argc, char* argv[])
|
|||
// Create main dialog object d
|
||||
MyDialog d{&app};
|
||||
d.setText (title);
|
||||
d.setGeometry ( FPoint{int((app.getWidth() - 56) / 2), 2}
|
||||
, FSize{56, app.getHeight() - 4} );
|
||||
d.setSize (FSize{56, app.getHeight() - 4});
|
||||
d.setShadow();
|
||||
|
||||
// Set the dialog object d as the main widget of the application.
|
||||
|
|
|
@ -79,8 +79,7 @@ Watch::Watch (FWidget* parent)
|
|||
// Avoids calling a virtual function from the constructor
|
||||
// (CERT, OOP50-CPP)
|
||||
FDialog::setText ("Watch");
|
||||
const int pw = int(getParentWidget()->getWidth());
|
||||
FDialog::setGeometry (FPoint{1 + (pw - 22) / 2, 3}, FSize{22, 13});
|
||||
FDialog::setSize ({22, 13});
|
||||
|
||||
// Labels
|
||||
time_label.setGeometry(FPoint{5, 2}, FSize{5, 1});
|
||||
|
@ -193,8 +192,9 @@ void Watch::cb_seconds()
|
|||
//----------------------------------------------------------------------
|
||||
void Watch::adjustSize()
|
||||
{
|
||||
const int pw = int(getParentWidget()->getWidth());
|
||||
const int pw = int(getDesktopWidth());
|
||||
setX (1 + (pw - 22) / 2, false);
|
||||
setY (3, false);
|
||||
finalcut::FDialog::adjustSize();
|
||||
}
|
||||
|
||||
|
|
|
@ -243,6 +243,8 @@ class Window final : public finalcut::FDialog
|
|||
Window::Window (finalcut::FWidget* parent)
|
||||
: finalcut::FDialog{parent}
|
||||
{
|
||||
setSize ({40, 6});
|
||||
|
||||
// Menu bar item
|
||||
File.setStatusbarMessage ("File management commands");
|
||||
|
||||
|
@ -349,6 +351,8 @@ void Window::activateWindow (finalcut::FDialog* win) const
|
|||
//----------------------------------------------------------------------
|
||||
void Window::adjustSize()
|
||||
{
|
||||
finalcut::FDialog::adjustSize();
|
||||
|
||||
const std::size_t w = getDesktopWidth();
|
||||
const std::size_t h = getDesktopHeight();
|
||||
const int X = int(1 + (w - 40) / 2);
|
||||
|
@ -375,8 +379,6 @@ void Window::adjustSize()
|
|||
|
||||
++iter;
|
||||
}
|
||||
|
||||
finalcut::FDialog::adjustSize();
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -574,8 +576,6 @@ int main (int argc, char* argv[])
|
|||
// Create main dialog object
|
||||
Window main_dlg {&app};
|
||||
main_dlg.setText ("Main window");
|
||||
main_dlg.setGeometry ( FPoint{int(1 + (app.getWidth() - 40) / 2), 2}
|
||||
, FSize{40, 6} );
|
||||
|
||||
// Set dialog main_dlg as main widget
|
||||
finalcut::FWidget::setMainWidget (&main_dlg);
|
||||
|
|
|
@ -11,14 +11,16 @@
|
|||
#include <sys/kd.h>
|
||||
#endif
|
||||
|
||||
#include <array>
|
||||
|
||||
namespace finalcut
|
||||
{
|
||||
|
||||
namespace fc
|
||||
{
|
||||
|
||||
constexpr struct unipair unicode_cp437_pairs[] =
|
||||
{
|
||||
constexpr std::array<struct unipair, 282> unicode_cp437_pairs =
|
||||
{{
|
||||
// .----------- unicode
|
||||
// | .---- fontpos
|
||||
// | |
|
||||
|
@ -304,10 +306,10 @@ constexpr struct unipair unicode_cp437_pairs[] =
|
|||
{0x266a, 0x0d},
|
||||
{0x266b, 0x0e},
|
||||
{0x266c, 0x0e}
|
||||
};
|
||||
}};
|
||||
|
||||
constexpr struct unipair unicode_newfont_pairs[] =
|
||||
{
|
||||
constexpr std::array<struct unipair, 299> unicode_newfont_pairs =
|
||||
{{
|
||||
// .----------- unicode
|
||||
// | .---- fontpos
|
||||
// | |
|
||||
|
@ -610,7 +612,7 @@ constexpr struct unipair unicode_newfont_pairs[] =
|
|||
{0xe1f9, 0xf9},
|
||||
{0xe1fb, 0xfb},
|
||||
{0xe1fc, 0xfc}
|
||||
};
|
||||
}};
|
||||
|
||||
} // namespace fc
|
||||
|
||||
|
|
|
@ -20,6 +20,7 @@
|
|||
* <http://www.gnu.org/licenses/>. *
|
||||
***********************************************************************/
|
||||
|
||||
#include <array>
|
||||
#include "final/fbusyindicator.h"
|
||||
|
||||
namespace finalcut
|
||||
|
@ -75,7 +76,7 @@ void FBusyIndicator::init()
|
|||
//----------------------------------------------------------------------
|
||||
void FBusyIndicator::createIndicatorText()
|
||||
{
|
||||
FString line[4]{};
|
||||
std::array<FString, 4> line{};
|
||||
|
||||
if ( FTerm::getEncoding() == fc::UTF8 )
|
||||
{
|
||||
|
|
1314
src/fcharmap.cpp
1314
src/fcharmap.cpp
File diff suppressed because it is too large
Load Diff
|
@ -282,7 +282,16 @@ void FDialog::move (const FPoint& d_pos)
|
|||
//----------------------------------------------------------------------
|
||||
inline bool FDialog::moveUp (int n)
|
||||
{
|
||||
if ( isBottomOutside() )
|
||||
{
|
||||
const auto y_max = int(getMaxHeight());
|
||||
FWindow::setY(y_max, false);
|
||||
putArea (getTermPos(), getVWin());
|
||||
restoreOverlaidWindows();
|
||||
}
|
||||
else
|
||||
move ({0, -n});
|
||||
|
||||
return ! setPos_error;
|
||||
}
|
||||
|
||||
|
@ -296,7 +305,16 @@ inline bool FDialog::moveDown (int n)
|
|||
//----------------------------------------------------------------------
|
||||
inline bool FDialog::moveLeft (int n)
|
||||
{
|
||||
if ( isLeftOutside() )
|
||||
{
|
||||
const auto x_max = int(getMaxWidth());
|
||||
FWindow::setX(x_max, false);
|
||||
putArea (getTermPos(), getVWin());
|
||||
restoreOverlaidWindows();
|
||||
}
|
||||
else
|
||||
move ({-n, 0});
|
||||
|
||||
return ! setPos_error;
|
||||
}
|
||||
|
||||
|
@ -458,8 +476,9 @@ void FDialog::onKeyPress (FKeyEvent* ev)
|
|||
if ( this == getMainWidget() )
|
||||
return;
|
||||
|
||||
if ( ev->key() == fc::Fkey_escape
|
||||
|| ev->key() == fc::Fkey_escape_mintty )
|
||||
if ( ! ev->isAccepted()
|
||||
&& ( ev->key() == fc::Fkey_escape
|
||||
|| ev->key() == fc::Fkey_escape_mintty) )
|
||||
{
|
||||
ev->accept();
|
||||
|
||||
|
@ -1385,48 +1404,58 @@ inline void FDialog::moveSizeKey (FKeyEvent* ev)
|
|||
{
|
||||
case fc::Fkey_up:
|
||||
moveUp(1);
|
||||
ev->accept();
|
||||
break;
|
||||
|
||||
case fc::Fkey_down:
|
||||
moveDown(1);
|
||||
ev->accept();
|
||||
break;
|
||||
|
||||
case fc::Fkey_left:
|
||||
moveLeft(1);
|
||||
ev->accept();
|
||||
break;
|
||||
|
||||
case fc::Fkey_right:
|
||||
moveRight(1);
|
||||
ev->accept();
|
||||
break;
|
||||
|
||||
case fc::Fmkey_up:
|
||||
case fc::Fkey_sr:
|
||||
reduceHeight(1);
|
||||
ev->accept();
|
||||
break;
|
||||
|
||||
case fc::Fmkey_down:
|
||||
case fc::Fkey_sf:
|
||||
expandHeight(1);
|
||||
ev->accept();
|
||||
break;
|
||||
|
||||
case fc::Fmkey_left:
|
||||
case fc::Fkey_sleft:
|
||||
reduceWidth(1);
|
||||
ev->accept();
|
||||
break;
|
||||
|
||||
case fc::Fmkey_right:
|
||||
case fc::Fkey_sright:
|
||||
expandWidth(1);
|
||||
ev->accept();
|
||||
break;
|
||||
|
||||
case fc::Fkey_return:
|
||||
case fc::Fkey_enter:
|
||||
acceptMoveSize();
|
||||
ev->accept();
|
||||
break;
|
||||
|
||||
case fc::Fkey_escape:
|
||||
case fc::Fkey_escape_mintty:
|
||||
cancelMoveSize();
|
||||
ev->accept();
|
||||
return;
|
||||
|
||||
default:
|
||||
|
@ -1470,6 +1499,24 @@ bool FDialog::isOutsideTerminal (const FPoint& pos) const
|
|||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
bool FDialog::isLeftOutside()
|
||||
{
|
||||
if ( getX() > int(getMaxWidth()) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
bool FDialog::isBottomOutside()
|
||||
{
|
||||
if ( getY() > int(getMaxHeight()) )
|
||||
return true;
|
||||
|
||||
return false;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
bool FDialog::isLowerRightResizeCorner (const mouseStates& ms) const
|
||||
{
|
||||
|
|
|
@ -366,10 +366,7 @@ FUserEvent::FUserEvent (fc::events ev_type, int user_event_id) // constructor
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
FUserEvent::~FUserEvent() // destructor
|
||||
{
|
||||
if ( ! external_data_pointer && data_pointer )
|
||||
delete data_pointer;
|
||||
}
|
||||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
int FUserEvent::getUserId() const
|
||||
|
|
|
@ -55,7 +55,7 @@ bool sortDirFirst ( const FFileDialog::FDirEntry& lhs
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString fileChooser ( FWidget* parent
|
||||
FString fileChooser ( FWidget* parent
|
||||
, const FString& dirname
|
||||
, const FString& filter
|
||||
, FFileDialog::DialogType type )
|
||||
|
@ -165,7 +165,7 @@ FFileDialog& FFileDialog::operator = (const FFileDialog& fdlg)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FFileDialog::getSelectedFile() const
|
||||
FString FFileDialog::getSelectedFile() const
|
||||
{
|
||||
const uLong n = uLong(filebrowser.currentItem() - 1);
|
||||
|
||||
|
@ -257,7 +257,7 @@ void FFileDialog::onKeyPress (FKeyEvent* ev)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FFileDialog::fileOpenChooser ( FWidget* parent
|
||||
FString FFileDialog::fileOpenChooser ( FWidget* parent
|
||||
, const FString& dirname
|
||||
, const FString& filter )
|
||||
{
|
||||
|
@ -265,7 +265,7 @@ const FString FFileDialog::fileOpenChooser ( FWidget* parent
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FFileDialog::fileSaveChooser ( FWidget* parent
|
||||
FString FFileDialog::fileSaveChooser ( FWidget* parent
|
||||
, const FString& dirname
|
||||
, const FString& filter )
|
||||
{
|
||||
|
@ -736,7 +736,7 @@ void FFileDialog::printPath (const FString& txt)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FFileDialog::getHomeDir()
|
||||
FString FFileDialog::getHomeDir()
|
||||
{
|
||||
struct passwd pwd{};
|
||||
struct passwd* pwd_ptr{};
|
||||
|
|
|
@ -20,6 +20,8 @@
|
|||
* <http://www.gnu.org/licenses/>. *
|
||||
***********************************************************************/
|
||||
|
||||
#include <array>
|
||||
|
||||
#include "final/fc.h"
|
||||
#include "final/fkey_map.h"
|
||||
#include "final/ftypes.h"
|
||||
|
@ -30,8 +32,8 @@ namespace finalcut
|
|||
namespace fc
|
||||
{
|
||||
|
||||
FKeyMap fkey[] =
|
||||
{
|
||||
std::array<FKeyMap, 174> fkey
|
||||
{{
|
||||
{ fc::Fkey_backspace , nullptr, "kb" }, // backspace key
|
||||
{ fc::Fkey_catab , nullptr, "ka" }, // clear-all-tabs key
|
||||
{ fc::Fkey_clear , nullptr, "kC" }, // clear-screen or erase key
|
||||
|
@ -210,12 +212,11 @@ FKeyMap fkey[] =
|
|||
{ fc::Fkey_slash , ESC "Oo", "KP1"}, // keypad slash
|
||||
{ fc::Fkey_asterisk , ESC "Oj", "KP2"}, // keypad asterisk
|
||||
{ fc::Fkey_minus_sign, ESC "Om", "KP3"}, // keypad minus sign
|
||||
{ fc::Fkey_plus_sign , ESC "Ok", "KP4"}, // keypad plus sign
|
||||
{ 0 , nullptr, "\0" }
|
||||
};
|
||||
{ fc::Fkey_plus_sign , ESC "Ok", "KP4"} // keypad plus sign
|
||||
}};
|
||||
|
||||
constexpr FMetakeyMap fmetakey[] =
|
||||
{
|
||||
constexpr std::array<FMetakeyMap, 228> fmetakey =
|
||||
{{
|
||||
{ fc::Fmkey_ic , "\033[2;3~" }, // M-insert
|
||||
{ fc::Fmkey_ic , "\033\033[2~" }, // M-insert
|
||||
{ fc::Fmkey_dc , "\033[3;3~" }, // M-delete
|
||||
|
@ -443,12 +444,11 @@ constexpr FMetakeyMap fmetakey[] =
|
|||
{ fc::Fmkey_left_curly_bracket , "\033{" }, // M-{
|
||||
{ fc::Fmkey_vertical_bar , "\033|" }, // M-|
|
||||
{ fc::Fmkey_right_curly_bracket , "\033}" }, // M-}
|
||||
{ fc::Fmkey_tilde , "\033~" }, // M-~
|
||||
{ 0 , "\0" }
|
||||
};
|
||||
{ fc::Fmkey_tilde , "\033~" } // M-~
|
||||
}};
|
||||
|
||||
constexpr FKeyName fkeyname[] =
|
||||
{
|
||||
constexpr std::array<FKeyName, 388> fkeyname =
|
||||
{{
|
||||
{ fc::Fckey_a , "Ctrl+A" },
|
||||
{ fc::Fckey_b , "Ctrl+B" },
|
||||
{ fc::Fckey_c , "Ctrl+C" },
|
||||
|
@ -836,9 +836,8 @@ constexpr FKeyName fkeyname[] =
|
|||
{ fc::Fkey_mouse , "xterm mouse" },
|
||||
{ fc::Fkey_extended_mouse , "SGR extended mouse" },
|
||||
{ fc::Fkey_urxvt_mouse , "urxvt mouse extension" },
|
||||
{ fc::Fkey_incomplete , "incomplete key string" },
|
||||
{ 0 , "\0" }
|
||||
};
|
||||
{ fc::Fkey_incomplete , "incomplete key string" }
|
||||
}};
|
||||
|
||||
} // namespace fc
|
||||
|
||||
|
|
|
@ -86,11 +86,20 @@ void FKeyboard::fetchKeyCode()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FKeyboard::getKeyName (const FKey keynum) const
|
||||
FString FKeyboard::getKeyName (const FKey keynum) const
|
||||
{
|
||||
for (std::size_t i{0}; fc::fkeyname[i].string[0] != 0; i++)
|
||||
if ( fc::fkeyname[i].num && fc::fkeyname[i].num == keynum )
|
||||
return FString{fc::fkeyname[i].string};
|
||||
const auto& key = std::find_if
|
||||
(
|
||||
fc::fkeyname.begin(),
|
||||
fc::fkeyname.end(),
|
||||
[&keynum] (fc::FKeyName kn)
|
||||
{
|
||||
return (kn.num > 0 && kn.num == keynum);
|
||||
}
|
||||
);
|
||||
|
||||
if ( key != fc::fkeyname.end() )
|
||||
return FString{key->string};
|
||||
|
||||
if ( keynum > 32 && keynum < 127 )
|
||||
return FString{char(keynum)};
|
||||
|
@ -98,12 +107,6 @@ const FString FKeyboard::getKeyName (const FKey keynum) const
|
|||
return FString{""};
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FKeyboard::setTermcapMap (fc::FKeyMap* keymap)
|
||||
{
|
||||
key_map = keymap;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FKeyboard::init()
|
||||
{
|
||||
|
@ -221,12 +224,12 @@ inline FKey FKeyboard::getTermcapKey()
|
|||
|
||||
assert ( FIFO_BUF_SIZE > 0 );
|
||||
|
||||
if ( ! key_map )
|
||||
if ( key_map.use_count() == 0 )
|
||||
return NOT_SET;
|
||||
|
||||
for (std::size_t i{0}; key_map[i].tname[0] != 0; i++)
|
||||
for (auto&& entry : *key_map)
|
||||
{
|
||||
const char* k = key_map[i].string;
|
||||
const char* k = entry.string;
|
||||
const std::size_t len = ( k ) ? std::strlen(k) : 0;
|
||||
|
||||
if ( k && std::strncmp(k, fifo_buf, len) == 0 ) // found
|
||||
|
@ -240,7 +243,7 @@ inline FKey FKeyboard::getTermcapKey()
|
|||
fifo_buf[n] = '\0';
|
||||
|
||||
input_data_pending = bool(fifo_buf[0] != '\0');
|
||||
return fc::fkey[i].num;
|
||||
return entry.num;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -254,9 +257,9 @@ inline FKey FKeyboard::getMetaKey()
|
|||
|
||||
assert ( FIFO_BUF_SIZE > 0 );
|
||||
|
||||
for (std::size_t i{0}; fc::fmetakey[i].string[0] != 0; i++)
|
||||
for (auto&& entry : fc::fmetakey)
|
||||
{
|
||||
const char* kmeta = fc::fmetakey[i].string; // The string is never null
|
||||
const char* kmeta = entry.string; // The string is never null
|
||||
const std::size_t len = std::strlen(kmeta);
|
||||
|
||||
if ( std::strncmp(kmeta, fifo_buf, len) == 0 ) // found
|
||||
|
@ -279,7 +282,7 @@ inline FKey FKeyboard::getMetaKey()
|
|||
fifo_buf[n] = '\0';
|
||||
|
||||
input_data_pending = bool(fifo_buf[0] != '\0');
|
||||
return fc::fmetakey[i].num;
|
||||
return entry.num;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -58,7 +58,7 @@ void FLogger::newlineReplace ( std::string& str
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const std::string FLogger::getTimeString() const
|
||||
std::string FLogger::getTimeString() const
|
||||
{
|
||||
char str[100];
|
||||
const auto& now = std::chrono::system_clock::now();
|
||||
|
@ -71,7 +71,7 @@ const std::string FLogger::getTimeString() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const std::string FLogger::getEOL() const
|
||||
std::string FLogger::getEOL() const
|
||||
{
|
||||
if ( getEnding() == FLog::LF )
|
||||
return "\n";
|
||||
|
|
|
@ -268,17 +268,17 @@ void FMenuBar::calculateDimensions() const
|
|||
// find the maximum item width
|
||||
for (auto&& item : getItemList())
|
||||
{
|
||||
int len = int(item->getTextWidth());
|
||||
int item_width = len + 2;
|
||||
auto len = item->getTextWidth();
|
||||
auto item_width = len + 2;
|
||||
|
||||
// set item geometry
|
||||
item->setGeometry (item_pos, FSize{std::size_t(item_width), 1}, false);
|
||||
item->setGeometry (item_pos, FSize{item_width, 1}, false);
|
||||
|
||||
// set menu position
|
||||
if ( item->hasMenu() )
|
||||
item->getMenu()->setPos (item_pos, false);
|
||||
|
||||
item_pos.x_ref() += item_width;
|
||||
item_pos.x_ref() += int(item_width);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -681,7 +681,7 @@ void FMenuBar::adjustItems() const
|
|||
for (auto&& item : getItemList())
|
||||
{
|
||||
// get item width
|
||||
int item_width = int(item->getWidth());
|
||||
auto item_width = item->getWidth();
|
||||
|
||||
if ( item->hasMenu() )
|
||||
{
|
||||
|
@ -694,7 +694,7 @@ void FMenuBar::adjustItems() const
|
|||
menu->adjustItems();
|
||||
}
|
||||
|
||||
item_X += item_width;
|
||||
item_X += int(item_width);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -606,7 +606,7 @@ void FMenuItem::createDialogList (FMenu* winmenu) const
|
|||
{
|
||||
auto win = static_cast<FDialog*>(*iter);
|
||||
FMenuItem* win_item{};
|
||||
const uInt32 n = uInt32(std::distance(first, iter));
|
||||
const auto n = uInt32(std::distance(first, iter));
|
||||
// get the dialog title
|
||||
const auto& name = win->getText();
|
||||
|
||||
|
|
|
@ -21,6 +21,7 @@
|
|||
***********************************************************************/
|
||||
|
||||
#include <algorithm>
|
||||
#include <array>
|
||||
|
||||
#include "final/fapplication.h"
|
||||
#include "final/fbutton.h"
|
||||
|
@ -30,8 +31,8 @@
|
|||
namespace finalcut
|
||||
{
|
||||
|
||||
static const char* const button_text[] =
|
||||
{
|
||||
constexpr std::array<const char* const, 8> button_text =
|
||||
{{
|
||||
nullptr,
|
||||
"&OK",
|
||||
"&Cancel",
|
||||
|
@ -39,9 +40,8 @@ static const char* const button_text[] =
|
|||
"&No",
|
||||
"&Abort",
|
||||
"&Retry",
|
||||
"&Ignore",
|
||||
nullptr
|
||||
};
|
||||
"&Ignore"
|
||||
}};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
// class FMessageBox
|
||||
|
@ -51,7 +51,7 @@ static const char* const button_text[] =
|
|||
//----------------------------------------------------------------------
|
||||
FMessageBox::FMessageBox (FWidget* parent)
|
||||
: FDialog{parent}
|
||||
, button_digit{FMessageBox::Ok, 0, 0}
|
||||
, button_digit{FMessageBox::Ok, FMessageBox::Reject, FMessageBox::Reject}
|
||||
{
|
||||
setTitlebarText("Message for you");
|
||||
init();
|
||||
|
@ -79,9 +79,9 @@ FMessageBox::FMessageBox (const FMessageBox& mbox)
|
|||
//----------------------------------------------------------------------
|
||||
FMessageBox::FMessageBox ( const FString& caption
|
||||
, const FString& message
|
||||
, int button0
|
||||
, int button1
|
||||
, int button2
|
||||
, ButtonType button0
|
||||
, ButtonType button1
|
||||
, ButtonType button2
|
||||
, FWidget* parent )
|
||||
: FDialog{parent}
|
||||
, text{message}
|
||||
|
@ -158,10 +158,10 @@ void FMessageBox::setText (const FString& txt)
|
|||
if ( button[0] )
|
||||
button[0]->setY (int(getHeight()) - 4, false);
|
||||
|
||||
if ( button[1] && button_digit[1] != 0 )
|
||||
if ( button[1] && button_digit[1] != FMessageBox::Reject )
|
||||
button[1]->setY (int(getHeight()) - 4, false);
|
||||
|
||||
if ( button[2] && button_digit[2] != 0 )
|
||||
if ( button[2] && button_digit[2] != FMessageBox::Reject )
|
||||
button[2]->setY (int(getHeight()) - 4, false);
|
||||
|
||||
adjustButtons();
|
||||
|
@ -195,9 +195,9 @@ void FMessageBox::adjustSize()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FMessageBox::cb_processClick (int reply)
|
||||
void FMessageBox::cb_processClick (ButtonType reply)
|
||||
{
|
||||
done(reply);
|
||||
done(int(reply));
|
||||
}
|
||||
|
||||
|
||||
|
@ -210,15 +210,18 @@ void FMessageBox::init()
|
|||
if ( (button_digit[2] && ! button_digit[1])
|
||||
|| (button_digit[1] && ! button_digit[0]) )
|
||||
{
|
||||
button_digit[0] = button_digit[1] = button_digit[2] = 0;
|
||||
button_digit[0] = button_digit[1] \
|
||||
= button_digit[2] \
|
||||
= FMessageBox::Reject;
|
||||
}
|
||||
|
||||
if ( button_digit[0] == 0 )
|
||||
if ( button_digit[0] == FMessageBox::Reject )
|
||||
button_digit[0] = FMessageBox::Ok;
|
||||
|
||||
if ( button_digit[1] == 0 && button_digit[2] == 0 )
|
||||
if ( button_digit[1] == FMessageBox::Reject
|
||||
&& button_digit[2] == FMessageBox::Reject )
|
||||
num_buttons = 1;
|
||||
else if ( button_digit[2] == 0 )
|
||||
else if ( button_digit[2] == FMessageBox::Reject )
|
||||
num_buttons = 2;
|
||||
else
|
||||
num_buttons = 3;
|
||||
|
@ -242,7 +245,7 @@ inline void FMessageBox::allocation()
|
|||
button[0]->setHeight(1, false);
|
||||
button[0]->setFocus();
|
||||
|
||||
if ( button_digit[1] > 0 )
|
||||
if ( button_digit[1] > FMessageBox::Reject )
|
||||
{
|
||||
button[1] = new FButton(this);
|
||||
button[1]->setText(button_text[button_digit[1]]);
|
||||
|
@ -251,7 +254,7 @@ inline void FMessageBox::allocation()
|
|||
button[1]->setHeight(1, false);
|
||||
}
|
||||
|
||||
if ( button_digit[2] > 0 )
|
||||
if ( button_digit[2] > FMessageBox::Reject )
|
||||
{
|
||||
button[2] = new FButton(this);
|
||||
button[2]->setText(button_text[button_digit[2]]);
|
||||
|
@ -278,7 +281,7 @@ inline void FMessageBox::deallocation()
|
|||
//----------------------------------------------------------------------
|
||||
inline void FMessageBox::initCallbacks()
|
||||
{
|
||||
if ( button[0] && button_digit[0] != 0 )
|
||||
if ( button[0] && button_digit[0] != FMessageBox::Reject )
|
||||
{
|
||||
button[0]->addCallback
|
||||
(
|
||||
|
@ -288,7 +291,7 @@ inline void FMessageBox::initCallbacks()
|
|||
);
|
||||
}
|
||||
|
||||
if ( button[1] && button_digit[1] != 0 )
|
||||
if ( button[1] && button_digit[1] != FMessageBox::Reject )
|
||||
{
|
||||
button[1]->addCallback
|
||||
(
|
||||
|
@ -298,7 +301,7 @@ inline void FMessageBox::initCallbacks()
|
|||
);
|
||||
}
|
||||
|
||||
if ( button[2] && button_digit[2] != 0 )
|
||||
if ( button[2] && button_digit[2] != FMessageBox::Reject )
|
||||
{
|
||||
button[2]->addCallback
|
||||
(
|
||||
|
@ -350,7 +353,7 @@ void FMessageBox::draw()
|
|||
int head_offset{0};
|
||||
int center_x{0};
|
||||
// center the whole block
|
||||
const int msg_x = int((getWidth() - max_line_width) / 2);
|
||||
const auto msg_x = int((getWidth() - max_line_width) / 2);
|
||||
|
||||
if ( FTerm::isMonochron() )
|
||||
setReverse(true);
|
||||
|
@ -388,7 +391,7 @@ void FMessageBox::draw()
|
|||
//----------------------------------------------------------------------
|
||||
void FMessageBox::resizeButtons() const
|
||||
{
|
||||
std::size_t len[3]{};
|
||||
std::array<std::size_t, 3> len{};
|
||||
std::size_t max_size{};
|
||||
|
||||
for (std::size_t n{0}; n < num_buttons && n < MAX_BUTTONS; n++)
|
||||
|
@ -447,7 +450,7 @@ void FMessageBox::adjustButtons()
|
|||
setX (int((max_width - getWidth()) / 2));
|
||||
}
|
||||
|
||||
const int btn_x = int((getWidth() - btn_width) / 2);
|
||||
const auto btn_x = int((getWidth() - btn_width) / 2);
|
||||
|
||||
for (std::size_t n{0}; n < num_buttons && n < MAX_BUTTONS; n++)
|
||||
{
|
||||
|
@ -458,7 +461,7 @@ void FMessageBox::adjustButtons()
|
|||
button[n]->setX(btn_x);
|
||||
else
|
||||
{
|
||||
const int btn_size = int(button[n]->getWidth());
|
||||
const auto btn_size = int(button[n]->getWidth());
|
||||
button[n]->setX(btn_x + int(n) * (btn_size + int(gap)));
|
||||
}
|
||||
}
|
||||
|
|
|
@ -54,7 +54,7 @@ FMouse::FMouse()
|
|||
|
||||
// public methods of FMouse
|
||||
//----------------------------------------------------------------------
|
||||
const FString FMouse::getClassName() const
|
||||
FString FMouse::getClassName() const
|
||||
{
|
||||
return "FMouse";
|
||||
}
|
||||
|
@ -287,7 +287,7 @@ FMouseGPM::~FMouseGPM() // destructor
|
|||
|
||||
// public methods of FMouseX11
|
||||
//----------------------------------------------------------------------
|
||||
const FString FMouseGPM::getClassName() const
|
||||
FString FMouseGPM::getClassName() const
|
||||
{
|
||||
return "FMouseGPM";
|
||||
}
|
||||
|
@ -520,7 +520,7 @@ int FMouseGPM::gpmEvent (bool clear) const
|
|||
|
||||
// public methods of FMouseX11
|
||||
//----------------------------------------------------------------------
|
||||
const FString FMouseX11::getClassName() const
|
||||
FString FMouseX11::getClassName() const
|
||||
{
|
||||
return "FMouseX11";
|
||||
}
|
||||
|
@ -698,7 +698,7 @@ void FMouseX11::setButtonState (const int btn, const struct timeval* time)
|
|||
|
||||
// public methods of FMouseSGR
|
||||
//----------------------------------------------------------------------
|
||||
const FString FMouseSGR::getClassName() const
|
||||
FString FMouseSGR::getClassName() const
|
||||
{
|
||||
return "FMouseSGR";
|
||||
}
|
||||
|
@ -928,7 +928,7 @@ void FMouseSGR::setReleasedButtonState (const int btn)
|
|||
|
||||
// public methods of FMouseUrxvt
|
||||
//----------------------------------------------------------------------
|
||||
const FString FMouseUrxvt::getClassName() const
|
||||
FString FMouseUrxvt::getClassName() const
|
||||
{
|
||||
return "FMouseUrxvt";
|
||||
}
|
||||
|
|
|
@ -382,11 +382,17 @@ bool FObject::delAllTimers() const
|
|||
// protected methods of FObject
|
||||
//----------------------------------------------------------------------
|
||||
void FObject::onTimer (FTimerEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive timer events for this object
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FObject::onUserEvent (FUserEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive user events for this object
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
uInt FObject::processTimerEvent()
|
||||
|
|
|
@ -531,11 +531,11 @@ FColor FOptiAttr::vga2ansi (FColor color)
|
|||
color = 0;
|
||||
else if ( color < 16 )
|
||||
{
|
||||
static const FColor lookup_table[] =
|
||||
{
|
||||
constexpr std::array<FColor, 16> lookup_table =
|
||||
{{
|
||||
0, 4, 2, 6, 1, 5, 3, 7,
|
||||
8, 12, 10, 14, 9, 13, 11, 15
|
||||
};
|
||||
}};
|
||||
|
||||
color = lookup_table[color];
|
||||
}
|
||||
|
|
|
@ -84,37 +84,37 @@ bool FRect::isEmpty() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FPoint FRect::getPos() const
|
||||
FPoint FRect::getPos() const
|
||||
{
|
||||
return { X1, Y1 };
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FPoint FRect::getUpperLeftPos() const
|
||||
FPoint FRect::getUpperLeftPos() const
|
||||
{
|
||||
return { X1, Y1 };
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FPoint FRect::getUpperRightPos() const
|
||||
FPoint FRect::getUpperRightPos() const
|
||||
{
|
||||
return { X2, Y1 };
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FPoint FRect::getLowerLeftPos() const
|
||||
FPoint FRect::getLowerLeftPos() const
|
||||
{
|
||||
return { X1, Y2 };
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FPoint FRect::getLowerRightPos() const
|
||||
FPoint FRect::getLowerRightPos() const
|
||||
{
|
||||
return { X2, Y2 };
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FSize FRect::getSize() const
|
||||
FSize FRect::getSize() const
|
||||
{
|
||||
return { getWidth(), getHeight() };
|
||||
}
|
||||
|
@ -338,7 +338,7 @@ FRect FRect::combined (const FRect& r) const
|
|||
|
||||
// FRect non-member operators
|
||||
//----------------------------------------------------------------------
|
||||
const FRect operator + (const FRect& r, const FSize& s)
|
||||
FRect operator + (const FRect& r, const FSize& s)
|
||||
{
|
||||
return { r.X1
|
||||
, r.Y1
|
||||
|
@ -347,7 +347,7 @@ const FRect operator + (const FRect& r, const FSize& s)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FRect operator - (const FRect& r, const FSize& s)
|
||||
FRect operator - (const FRect& r, const FSize& s)
|
||||
{
|
||||
return { r.X1
|
||||
, r.Y1
|
||||
|
|
|
@ -409,13 +409,13 @@ char* FString::c_str()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const std::string FString::toString() const
|
||||
std::string FString::toString() const
|
||||
{
|
||||
return std::string(c_str(), length);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FString::toLower() const
|
||||
FString FString::toLower() const
|
||||
{
|
||||
FString s{*this};
|
||||
auto to_lower = [] (wchar_t& c)
|
||||
|
@ -427,7 +427,7 @@ const FString FString::toLower() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FString::toUpper() const
|
||||
FString FString::toUpper() const
|
||||
{
|
||||
FString s{*this};
|
||||
auto to_upper = [] (wchar_t& c)
|
||||
|
@ -455,7 +455,7 @@ sInt16 FString::toShort() const
|
|||
//----------------------------------------------------------------------
|
||||
uInt16 FString::toUShort() const
|
||||
{
|
||||
const uLong num = uLong(toULong());
|
||||
const uLong num = toULong();
|
||||
|
||||
if ( num > USHRT_MAX )
|
||||
throw std::overflow_error ("overflow");
|
||||
|
@ -466,7 +466,7 @@ uInt16 FString::toUShort() const
|
|||
//----------------------------------------------------------------------
|
||||
int FString::toInt() const
|
||||
{
|
||||
long num = toLong();
|
||||
const long num = toLong();
|
||||
|
||||
if ( num > INT_MAX )
|
||||
throw std::overflow_error ("overflow");
|
||||
|
@ -480,7 +480,7 @@ int FString::toInt() const
|
|||
//----------------------------------------------------------------------
|
||||
uInt FString::toUInt() const
|
||||
{
|
||||
const uLong num = uLong(toULong());
|
||||
const uLong num = toULong();
|
||||
|
||||
if ( num > UINT_MAX )
|
||||
throw std::overflow_error ("overflow");
|
||||
|
@ -518,7 +518,7 @@ long FString::toLong() const
|
|||
|
||||
while ( std::iswdigit(std::wint_t(*p)) )
|
||||
{
|
||||
uChar d = uChar(*p - L'0');
|
||||
auto d = uChar(*p - L'0');
|
||||
|
||||
if ( num > tenth_limit
|
||||
|| (num == tenth_limit && d > tenth_limit_digit) )
|
||||
|
@ -568,7 +568,7 @@ uLong FString::toULong() const
|
|||
|
||||
while ( std::iswdigit(std::wint_t(*p)) )
|
||||
{
|
||||
const uChar d = uChar(*p - L'0');
|
||||
const auto d = uChar(*p - L'0');
|
||||
|
||||
if ( num > tenth_limit
|
||||
|| (num == tenth_limit && d > tenth_limit_digit) )
|
||||
|
@ -628,7 +628,7 @@ double FString::toDouble() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FString::ltrim() const
|
||||
FString FString::ltrim() const
|
||||
{
|
||||
const FString s{*this};
|
||||
|
||||
|
@ -645,7 +645,7 @@ const FString FString::ltrim() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FString::rtrim() const
|
||||
FString FString::rtrim() const
|
||||
{
|
||||
FString s{*this};
|
||||
|
||||
|
@ -668,7 +668,7 @@ const FString FString::rtrim() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FString::trim() const
|
||||
FString FString::trim() const
|
||||
{
|
||||
// handle NULL and empty string
|
||||
if ( ! (string && *string) )
|
||||
|
@ -679,7 +679,7 @@ const FString FString::trim() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FString::left (std::size_t len) const
|
||||
FString FString::left (std::size_t len) const
|
||||
{
|
||||
FString s{*this};
|
||||
|
||||
|
@ -697,7 +697,7 @@ const FString FString::left (std::size_t len) const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FString::right (std::size_t len) const
|
||||
FString FString::right (std::size_t len) const
|
||||
{
|
||||
const FString s{*this};
|
||||
|
||||
|
@ -714,7 +714,7 @@ const FString FString::right (std::size_t len) const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FString::mid (std::size_t pos, std::size_t len) const
|
||||
FString FString::mid (std::size_t pos, std::size_t len) const
|
||||
{
|
||||
const FString s{*this};
|
||||
|
||||
|
@ -771,7 +771,7 @@ FString& FString::setNumber (sInt64 num)
|
|||
{
|
||||
wchar_t buf[30]{};
|
||||
wchar_t* s = &buf[29]; // Pointer to the last character
|
||||
uInt64 abs_num = static_cast<uInt64>(num);
|
||||
auto abs_num = static_cast<uInt64>(num);
|
||||
|
||||
if ( num < 0 )
|
||||
abs_num = static_cast<uInt64>(-num);
|
||||
|
@ -847,7 +847,7 @@ FString& FString::setFormatedNumber (sInt64 num, char separator)
|
|||
int n{0};
|
||||
wchar_t buf[30]{};
|
||||
wchar_t* s = &buf[29]; // Pointer to the last character
|
||||
uInt64 abs_num = static_cast<uInt64>(num);
|
||||
auto abs_num = static_cast<uInt64>(num);
|
||||
|
||||
if ( separator == 0 )
|
||||
separator = ' ';
|
||||
|
@ -1001,7 +1001,7 @@ const FString& FString::insert (const FString& s, std::size_t pos)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
FString const FString::replace (const FString& from, const FString& to) const
|
||||
FString FString::replace (const FString& from, const FString& to) const
|
||||
{
|
||||
FString s{*this};
|
||||
|
||||
|
@ -1040,7 +1040,7 @@ FString const FString::replace (const FString& from, const FString& to) const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FString::replaceControlCodes() const
|
||||
FString FString::replaceControlCodes() const
|
||||
{
|
||||
FString s{*this};
|
||||
|
||||
|
@ -1066,7 +1066,7 @@ const FString FString::replaceControlCodes() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FString::expandTabs (int tabstop) const
|
||||
FString FString::expandTabs (int tabstop) const
|
||||
{
|
||||
FString instr{string};
|
||||
FString outstr{};
|
||||
|
@ -1079,8 +1079,8 @@ const FString FString::expandTabs (int tabstop) const
|
|||
|
||||
for (std::size_t i{0}; i < last; i++)
|
||||
{
|
||||
const std::size_t len = tab_split[i].getLength();
|
||||
const std::size_t tab_len = std::size_t(tabstop);
|
||||
const auto len = tab_split[i].getLength();
|
||||
const auto tab_len = std::size_t(tabstop);
|
||||
|
||||
if ( i == last - 1 )
|
||||
outstr += tab_split[i];
|
||||
|
@ -1527,7 +1527,7 @@ inline const wchar_t* FString::_extractToken ( wchar_t* rest[]
|
|||
|
||||
// FString non-member operators
|
||||
//----------------------------------------------------------------------
|
||||
const FString operator + (const FString& s1, const FString& s2)
|
||||
FString operator + (const FString& s1, const FString& s2)
|
||||
{
|
||||
FString tmp{s1};
|
||||
tmp._insert (tmp.length, s2.length, s2.wc_str());
|
||||
|
@ -1535,7 +1535,7 @@ const FString operator + (const FString& s1, const FString& s2)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString operator + (const FString& s, const wchar_t c)
|
||||
FString operator + (const FString& s, const wchar_t c)
|
||||
{
|
||||
FString tmp1{s};
|
||||
wchar_t tmp2[2];
|
||||
|
@ -1546,7 +1546,7 @@ const FString operator + (const FString& s, const wchar_t c)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString operator + (const std::wstring& s1, const FString& s2)
|
||||
FString operator + (const std::wstring& s1, const FString& s2)
|
||||
{
|
||||
FString tmp{s1};
|
||||
tmp._insert (tmp.length, s2.length, s2.wc_str());
|
||||
|
@ -1554,7 +1554,7 @@ const FString operator + (const std::wstring& s1, const FString& s2)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString operator + (const wchar_t s1[], const FString& s2)
|
||||
FString operator + (const wchar_t s1[], const FString& s2)
|
||||
{
|
||||
FString tmp{s1};
|
||||
tmp._insert (tmp.length, s2.length, s2.wc_str());
|
||||
|
@ -1562,7 +1562,7 @@ const FString operator + (const wchar_t s1[], const FString& s2)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString operator + (const std::string& s1, const FString& s2)
|
||||
FString operator + (const std::string& s1, const FString& s2)
|
||||
{
|
||||
FString tmp{s1};
|
||||
tmp._insert (tmp.length, s2.length, s2.wc_str());
|
||||
|
@ -1570,7 +1570,7 @@ const FString operator + (const std::string& s1, const FString& s2)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString operator + (const char s1[], const FString& s2)
|
||||
FString operator + (const char s1[], const FString& s2)
|
||||
{
|
||||
FString tmp{s1};
|
||||
tmp._insert (tmp.length, s2.length, s2.wc_str());
|
||||
|
@ -1578,7 +1578,7 @@ const FString operator + (const char s1[], const FString& s2)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString operator + (const wchar_t c, const FString& s)
|
||||
FString operator + (const wchar_t c, const FString& s)
|
||||
{
|
||||
FString tmp{c};
|
||||
tmp._insert (1, s.length, s.wc_str());
|
||||
|
@ -1586,7 +1586,7 @@ const FString operator + (const wchar_t c, const FString& s)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString operator + (const char c, const FString& s)
|
||||
FString operator + (const char c, const FString& s)
|
||||
{
|
||||
FString tmp{c};
|
||||
tmp._insert (1, s.length, s.wc_str());
|
||||
|
@ -1594,7 +1594,7 @@ const FString operator + (const char c, const FString& s)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString operator + (const FString& s, const char c)
|
||||
FString operator + (const FString& s, const char c)
|
||||
{
|
||||
FString tmp1{s};
|
||||
wchar_t tmp2[2];
|
||||
|
@ -1607,7 +1607,7 @@ const FString operator + (const FString& s, const char c)
|
|||
//----------------------------------------------------------------------
|
||||
std::ostream& operator << (std::ostream& outstr, const FString& s)
|
||||
{
|
||||
const std::size_t width = std::size_t(outstr.width());
|
||||
const auto width = std::size_t(outstr.width());
|
||||
|
||||
if ( s.length > 0 )
|
||||
{
|
||||
|
@ -1641,7 +1641,7 @@ std::istream& operator >> (std::istream& instr, FString& s)
|
|||
//----------------------------------------------------------------------
|
||||
std::wostream& operator << (std::wostream& outstr, const FString& s)
|
||||
{
|
||||
const std::size_t width = std::size_t(outstr.width());
|
||||
const auto width = std::size_t(outstr.width());
|
||||
|
||||
if ( s.length > 0 )
|
||||
{
|
||||
|
|
|
@ -158,7 +158,7 @@ std::size_t FTerm::getColumnNumber()
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FTerm::getKeyName (FKey keynum)
|
||||
FString FTerm::getKeyName (FKey keynum)
|
||||
{
|
||||
return keyboard->getKeyName (keynum);
|
||||
}
|
||||
|
@ -202,7 +202,7 @@ int FTerm::getMaxColor()
|
|||
//----------------------------------------------------------------------
|
||||
FTerm::FColorPalettePtr& FTerm::getColorPaletteTheme()
|
||||
{
|
||||
static FColorPalettePtr* color_theme = new FColorPalettePtr();
|
||||
static auto color_theme = new FColorPalettePtr();
|
||||
return *color_theme;
|
||||
}
|
||||
|
||||
|
@ -820,16 +820,15 @@ int FTerm::openConsole()
|
|||
int fd = data->getTTYFileDescriptor();
|
||||
const char* termfilename = data->getTermFileName();
|
||||
|
||||
static const char* terminal_devices[] =
|
||||
{
|
||||
constexpr std::array<const char*, 6> terminal_devices =
|
||||
{{
|
||||
"/proc/self/fd/0",
|
||||
"/dev/tty",
|
||||
"/dev/tty0",
|
||||
"/dev/vc/0",
|
||||
"/dev/systty",
|
||||
"/dev/console",
|
||||
nullptr
|
||||
};
|
||||
"/dev/console"
|
||||
}};
|
||||
|
||||
if ( fd >= 0 ) // console is already opened
|
||||
return 0;
|
||||
|
@ -837,9 +836,9 @@ int FTerm::openConsole()
|
|||
if ( ! *termfilename || ! fsys )
|
||||
return 0;
|
||||
|
||||
for (std::size_t i{0}; terminal_devices[i] != nullptr; i++)
|
||||
for (auto&& entry : terminal_devices)
|
||||
{
|
||||
fd = fsys->open(terminal_devices[i], O_RDWR, 0);
|
||||
fd = fsys->open(entry, O_RDWR, 0);
|
||||
data->setTTYFileDescriptor(fd);
|
||||
|
||||
if ( fd >= 0 )
|
||||
|
@ -1191,11 +1190,11 @@ wchar_t FTerm::charEncode (wchar_t c, fc::encoding enc)
|
|||
{
|
||||
wchar_t ch_enc = c;
|
||||
|
||||
for (std::size_t i{0}; i <= fc::last_char_item; i++)
|
||||
for (auto&& entry : fc::character)
|
||||
{
|
||||
if ( fc::character[i][fc::UTF8] == uInt(c) )
|
||||
if ( entry[fc::UTF8] == uInt(c) )
|
||||
{
|
||||
ch_enc = wchar_t(fc::character[i][enc]);
|
||||
ch_enc = wchar_t(entry[enc]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -1235,7 +1234,7 @@ bool FTerm::scrollTermReverse()
|
|||
//----------------------------------------------------------------------
|
||||
FTerm::defaultPutChar& FTerm::putchar()
|
||||
{
|
||||
static defaultPutChar* fputchar = new defaultPutChar();
|
||||
static auto fputchar = new defaultPutChar();
|
||||
return *fputchar;
|
||||
}
|
||||
|
||||
|
@ -1408,8 +1407,8 @@ void FTerm::init_alt_charset()
|
|||
for (std::size_t n{0}; TCAP(fc::t_acs_chars)[n]; n += 2)
|
||||
{
|
||||
// insert the VT100 key/value pairs into a map
|
||||
const uChar p1 = uChar(TCAP(fc::t_acs_chars)[n]);
|
||||
const uChar p2 = uChar(TCAP(fc::t_acs_chars)[n + 1]);
|
||||
const auto p1 = uChar(TCAP(fc::t_acs_chars)[n]);
|
||||
const auto p2 = uChar(TCAP(fc::t_acs_chars)[n + 1]);
|
||||
vt100_alt_char[p1] = p2;
|
||||
}
|
||||
}
|
||||
|
@ -1421,19 +1420,18 @@ void FTerm::init_alt_charset()
|
|||
};
|
||||
|
||||
// Update array 'character' with discovered VT100 pairs
|
||||
for (std::size_t n{0}; n <= fc::last_key_item; n++ )
|
||||
for (auto&& pair : fc::vt100_key_to_utf8)
|
||||
{
|
||||
const uChar keyChar = uChar(fc::vt100_key_to_utf8[n][vt100_key]);
|
||||
const uChar altChar = uChar(vt100_alt_char[keyChar]);
|
||||
const uInt utf8char = uInt(fc::vt100_key_to_utf8[n][utf8_char]);
|
||||
const fc::encoding num{fc::NUM_OF_ENCODINGS};
|
||||
|
||||
uInt* p = std::find ( fc::character[0]
|
||||
, fc::character[fc::last_char_item] + num
|
||||
, utf8char );
|
||||
if ( p != fc::character[fc::last_char_item] + num ) // found in character
|
||||
const auto keyChar = uChar(pair[vt100_key]);
|
||||
const auto altChar = uChar(vt100_alt_char[keyChar]);
|
||||
const auto utf8char = uInt(pair[utf8_char]);
|
||||
const auto p = std::find_if ( fc::character.begin()
|
||||
, fc::character.end()
|
||||
, [&utf8char] (std::array<uInt, 4> entry)
|
||||
{ return entry[0] == utf8char; } );
|
||||
if ( p != fc::character.end() ) // found in character
|
||||
{
|
||||
const int item = int(std::distance(fc::character[0], p) / num);
|
||||
const auto item = std::size_t(std::distance(fc::character.begin(), p));
|
||||
|
||||
if ( altChar ) // update alternate character set
|
||||
fc::character[item][fc::VT100] = altChar;
|
||||
|
@ -1506,24 +1504,24 @@ void FTerm::init_cygwin_charmap()
|
|||
return;
|
||||
|
||||
// PC encoding changes
|
||||
for (std::size_t i{0}; i <= fc::last_char_item; i++ )
|
||||
for (auto&& entry : fc::character)
|
||||
{
|
||||
if ( fc::character[i][fc::UTF8] == fc::BlackUpPointingTriangle ) // ▲
|
||||
fc::character[i][fc::PC] = 0x18;
|
||||
if ( entry[fc::UTF8] == fc::BlackUpPointingTriangle ) // ▲
|
||||
entry[fc::PC] = 0x18;
|
||||
|
||||
if ( fc::character[i][fc::UTF8] == fc::BlackDownPointingTriangle ) // ▼
|
||||
fc::character[i][fc::PC] = 0x19;
|
||||
if ( entry[fc::UTF8] == fc::BlackDownPointingTriangle ) // ▼
|
||||
entry[fc::PC] = 0x19;
|
||||
|
||||
if ( fc::character[i][fc::UTF8] == fc::InverseBullet // ◘
|
||||
|| fc::character[i][fc::UTF8] == fc::InverseWhiteCircle // ◙
|
||||
|| fc::character[i][fc::UTF8] == fc::UpDownArrow // ↕
|
||||
|| fc::character[i][fc::UTF8] == fc::LeftRightArrow // ↔
|
||||
|| fc::character[i][fc::UTF8] == fc::DoubleExclamationMark // ‼
|
||||
|| fc::character[i][fc::UTF8] == fc::BlackRectangle // ▬
|
||||
|| fc::character[i][fc::UTF8] == fc::RightwardsArrow // →
|
||||
|| fc::character[i][fc::UTF8] == fc::Section // §
|
||||
|| fc::character[i][fc::UTF8] == fc::SquareRoot ) // SquareRoot √
|
||||
fc::character[i][fc::PC] = fc::character[i][fc::ASCII];
|
||||
if ( entry[fc::UTF8] == fc::InverseBullet // ◘
|
||||
|| entry[fc::UTF8] == fc::InverseWhiteCircle // ◙
|
||||
|| entry[fc::UTF8] == fc::UpDownArrow // ↕
|
||||
|| entry[fc::UTF8] == fc::LeftRightArrow // ↔
|
||||
|| entry[fc::UTF8] == fc::DoubleExclamationMark // ‼
|
||||
|| entry[fc::UTF8] == fc::BlackRectangle // ▬
|
||||
|| entry[fc::UTF8] == fc::RightwardsArrow // →
|
||||
|| entry[fc::UTF8] == fc::Section // §
|
||||
|| entry[fc::UTF8] == fc::SquareRoot ) // SquareRoot √
|
||||
entry[fc::PC] = entry[fc::ASCII];
|
||||
}
|
||||
|
||||
// General encoding changes
|
||||
|
@ -1560,9 +1558,9 @@ void FTerm::init_teraterm_charmap()
|
|||
if ( ! isTeraTerm() )
|
||||
return;
|
||||
|
||||
for (std::size_t i{0}; i <= fc::last_char_item; i++ )
|
||||
if ( fc::character[i][fc::PC] < 0x20 )
|
||||
fc::character[i][fc::PC] = fc::character[i][fc::ASCII];
|
||||
for (auto&& entry : fc::character)
|
||||
if ( entry[fc::PC] < 0x20 )
|
||||
entry[fc::PC] = entry[fc::ASCII];
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -274,11 +274,11 @@ wchar_t cp437_to_unicode (uChar c)
|
|||
constexpr std::size_t UNICODE = 1;
|
||||
wchar_t ucs = c;
|
||||
|
||||
for (std::size_t i{0}; i <= fc::last_cp437_item; i++)
|
||||
for (auto&& entry : fc::cp437_ucs)
|
||||
{
|
||||
if ( fc::cp437_ucs[i][CP437] == c ) // found
|
||||
if ( entry[CP437] == c ) // found
|
||||
{
|
||||
ucs = fc::cp437_ucs[i][UNICODE];
|
||||
ucs = entry[UNICODE];
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -293,11 +293,11 @@ uChar unicode_to_cp437 (wchar_t ucs)
|
|||
constexpr std::size_t UNICODE = 1;
|
||||
uChar c{'?'};
|
||||
|
||||
for (std::size_t i{0}; i <= fc::last_cp437_item; i++)
|
||||
for (auto&& entry : fc::cp437_ucs)
|
||||
{
|
||||
if ( fc::cp437_ucs[i][UNICODE] == ucs ) // found
|
||||
if ( entry[UNICODE] == ucs ) // found
|
||||
{
|
||||
c = uChar(fc::cp437_ucs[i][CP437]);
|
||||
c = uChar(entry[CP437]);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
@ -306,7 +306,7 @@ uChar unicode_to_cp437 (wchar_t ucs)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString getFullWidth (const FString& str)
|
||||
FString getFullWidth (const FString& str)
|
||||
{
|
||||
// Converts half-width to full-width characters
|
||||
|
||||
|
@ -322,10 +322,10 @@ const FString getFullWidth (const FString& str)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (std::size_t i{0}; i <= fc::last_halfwidth_item; i++)
|
||||
for (auto&& entry : fc::halfwidth_fullwidth)
|
||||
{
|
||||
if ( fc::halfwidth_fullwidth[i][HALF] == c ) // found
|
||||
c = fc::halfwidth_fullwidth[i][FULL];
|
||||
if ( entry[HALF] == c ) // found
|
||||
c = entry[FULL];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -334,7 +334,7 @@ const FString getFullWidth (const FString& str)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString getHalfWidth (const FString& str)
|
||||
FString getHalfWidth (const FString& str)
|
||||
{
|
||||
// Converts full-width to half-width characters
|
||||
|
||||
|
@ -350,10 +350,10 @@ const FString getHalfWidth (const FString& str)
|
|||
}
|
||||
else
|
||||
{
|
||||
for (std::size_t i{0}; i <= fc::last_halfwidth_item; i++)
|
||||
for (auto&& entry : fc::halfwidth_fullwidth)
|
||||
{
|
||||
if ( fc::halfwidth_fullwidth[i][FULL] == c ) // found
|
||||
c = fc::halfwidth_fullwidth[i][HALF];
|
||||
if ( entry[FULL] == c ) // found
|
||||
c = entry[HALF];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -362,7 +362,7 @@ const FString getHalfWidth (const FString& str)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString getColumnSubString ( const FString& str
|
||||
FString getColumnSubString ( const FString& str
|
||||
, std::size_t col_pos
|
||||
, std::size_t col_len )
|
||||
{
|
||||
|
|
|
@ -43,7 +43,7 @@ FTermBuffer::~FTermBuffer() // destructor
|
|||
|
||||
// public methods of FTermBuffer
|
||||
//----------------------------------------------------------------------
|
||||
const FString FTermBuffer::toString() const
|
||||
FString FTermBuffer::toString() const
|
||||
{
|
||||
std::wstring wide_string{};
|
||||
wide_string.reserve(data.size());
|
||||
|
@ -62,7 +62,7 @@ const FString FTermBuffer::toString() const
|
|||
int FTermBuffer::write (const FString& string)
|
||||
{
|
||||
assert ( ! string.isNull() );
|
||||
const int len = int(string.getLength());
|
||||
const auto len = int(string.getLength());
|
||||
|
||||
for (auto&& c : string)
|
||||
{
|
||||
|
|
|
@ -224,8 +224,9 @@ void FTermcap::termcapStrings()
|
|||
// Get termcap strings
|
||||
|
||||
// Read termcap output strings
|
||||
for (std::size_t i{0}; strings[i].tname[0] != 0; i++)
|
||||
strings[i].string = getString(strings[i].tname);
|
||||
|
||||
for (auto&& entry : strings)
|
||||
entry.string = getString(entry.tname);
|
||||
|
||||
const auto& ho = TCAP(fc::t_cursor_home);
|
||||
|
||||
|
@ -239,10 +240,8 @@ void FTermcap::termcapKeys()
|
|||
// Get termcap keys
|
||||
|
||||
// Read termcap key sequences up to the self-defined values
|
||||
for ( std::size_t i{0};
|
||||
fc::fkey[i].string == nullptr && fc::fkey[i].tname[0] != 0;
|
||||
i++ )
|
||||
fc::fkey[i].string = getString(fc::fkey[i].tname);
|
||||
for (auto&& entry : fc::fkey)
|
||||
entry.string = getString(entry.tname);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -257,8 +256,8 @@ int FTermcap::_tputs (const char* str, int affcnt, fn_putc putc)
|
|||
|
||||
// private Data Member of FTermcap - termcap capabilities
|
||||
//----------------------------------------------------------------------
|
||||
FTermcap::tcap_map FTermcap::strings[] =
|
||||
{
|
||||
FTermcap::TCapMapType FTermcap::strings =
|
||||
{{
|
||||
// .------------- term string
|
||||
// | .-------- Tcap-code
|
||||
// | | // variable name -> description
|
||||
|
@ -347,9 +346,8 @@ FTermcap::tcap_map FTermcap::strings[] =
|
|||
{ nullptr, "ac" }, // acs_chars -> graphics charset pairs (vt100)
|
||||
{ nullptr, "ks" }, // keypad_xmit -> enter 'key-board_transmit' mode
|
||||
{ nullptr, "ke" }, // keypad_local -> leave 'key-board_transmit' mode
|
||||
{ nullptr, "Km" }, // key_mouse -> Mouse event has occurred
|
||||
{ nullptr, "\0" }
|
||||
};
|
||||
{ nullptr, "Km" } // key_mouse -> Mouse event has occurred
|
||||
}};
|
||||
|
||||
/*
|
||||
* (P) indicates that padding may be specified
|
||||
|
|
|
@ -171,9 +171,9 @@ void FTermFreeBSD::initCharMap()
|
|||
if ( ! isFreeBSDConsole() )
|
||||
return;
|
||||
|
||||
for (std::size_t i{0}; i <= fc::last_char_item; i++)
|
||||
if ( fc::character[i][fc::PC] < 0x1c )
|
||||
fc::character[i][fc::PC] = fc::character[i][fc::ASCII];
|
||||
for (auto&& entry : fc::character)
|
||||
if ( entry[fc::PC] < 0x1c )
|
||||
entry[fc::PC] = entry[fc::ASCII];
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -217,14 +217,14 @@ void FTermLinux::initCharMap()
|
|||
|
||||
if ( screen_unicode_map.entry_ct > 0 && screen_unicode_map.entries )
|
||||
{
|
||||
for (std::size_t i{0}; i <= fc::last_char_item; i++ )
|
||||
for (auto&& entry : fc::character)
|
||||
{
|
||||
const auto ucs = wchar_t(fc::character[i][fc::UTF8]);
|
||||
const auto ucs = wchar_t(entry[fc::UTF8]);
|
||||
const sInt16 fontpos = getFontPos(ucs);
|
||||
|
||||
// Fix for a non-cp437 Linux console with PC charset encoding
|
||||
if ( fontpos > 255 || fontpos == NOT_FOUND )
|
||||
fc::character[i][fc::PC] = fc::character[i][fc::ASCII];
|
||||
entry[fc::PC] = entry[fc::ASCII];
|
||||
|
||||
// Character substitutions for missing characters
|
||||
if ( fontpos == NOT_FOUND )
|
||||
|
@ -700,7 +700,7 @@ int FTermLinux::setScreenFont ( const uChar fontdata[], uInt count
|
|||
for (std::size_t i{0}; i < count; i++)
|
||||
std::memcpy ( font.data + bytes_per_line * 32 * i
|
||||
, &fontdata[i * font.height]
|
||||
, font.height);
|
||||
, font.height );
|
||||
}
|
||||
|
||||
// Font operation
|
||||
|
@ -932,8 +932,8 @@ void FTermLinux::getVGAPalette()
|
|||
//----------------------------------------------------------------------
|
||||
void FTermLinux::setVGADefaultPalette()
|
||||
{
|
||||
constexpr rgb defaultColor[16] =
|
||||
{
|
||||
constexpr std::array<rgb, 16> defaultColor =
|
||||
{{
|
||||
{0x00, 0x00, 0x00}, {0xaa, 0x00, 0x00},
|
||||
{0x00, 0xaa, 0x00}, {0xaa, 0x55, 0x00},
|
||||
{0x00, 0x00, 0xaa}, {0xaa, 0x00, 0xaa},
|
||||
|
@ -942,7 +942,7 @@ void FTermLinux::setVGADefaultPalette()
|
|||
{0x55, 0xff, 0x55}, {0xff, 0xff, 0x55},
|
||||
{0x55, 0x55, 0xff}, {0xff, 0x55, 0xff},
|
||||
{0x55, 0xff, 0xff}, {0xff, 0xff, 0xff}
|
||||
};
|
||||
}};
|
||||
|
||||
for (std::size_t index{0}; index < 16; index++)
|
||||
{
|
||||
|
|
|
@ -743,7 +743,7 @@ void FTermXTerminal::oscPostfix() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FTermXTerminal::captureXTermFont() const
|
||||
FString FTermXTerminal::captureXTermFont() const
|
||||
{
|
||||
initCheck(FString{});
|
||||
|
||||
|
@ -787,7 +787,7 @@ const FString FTermXTerminal::captureXTermFont() const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FString FTermXTerminal::captureXTermTitle() const
|
||||
FString FTermXTerminal::captureXTermTitle() const
|
||||
{
|
||||
initCheck(FString{});
|
||||
|
||||
|
|
|
@ -54,7 +54,7 @@ FTextView::~FTextView() // destructor
|
|||
|
||||
// public methods of FTextView
|
||||
//----------------------------------------------------------------------
|
||||
const FString FTextView::getText() const
|
||||
FString FTextView::getText() const
|
||||
{
|
||||
if ( data.empty() )
|
||||
return FString{""};
|
||||
|
@ -149,7 +149,7 @@ void FTextView::scrollTo (int x, int y)
|
|||
|
||||
if ( changeX && isHorizontallyScrollable() )
|
||||
{
|
||||
const int xoffset_end = int(max_line_width - getTextWidth());
|
||||
const auto xoffset_end = int(max_line_width - getTextWidth());
|
||||
xoffset = x;
|
||||
|
||||
if ( xoffset < 0 )
|
||||
|
@ -167,7 +167,7 @@ void FTextView::scrollTo (int x, int y)
|
|||
|
||||
if ( changeY && isVerticallyScrollable() )
|
||||
{
|
||||
const int yoffset_end = int(getRows() - getTextHeight());
|
||||
const auto yoffset_end = int(getRows() - getTextHeight());
|
||||
yoffset = y;
|
||||
|
||||
if ( yoffset < 0 )
|
||||
|
@ -335,7 +335,7 @@ void FTextView::clear()
|
|||
//----------------------------------------------------------------------
|
||||
void FTextView::onKeyPress (FKeyEvent* ev)
|
||||
{
|
||||
const int idx = int(ev->key());
|
||||
const auto idx = int(ev->key());
|
||||
|
||||
if ( key_map.find(idx) != key_map.end() )
|
||||
{
|
||||
|
@ -504,8 +504,8 @@ void FTextView::adjustSize()
|
|||
FWidget::adjustSize();
|
||||
const std::size_t width = getWidth();
|
||||
const std::size_t height = getHeight();
|
||||
const int last_line = int(getRows());
|
||||
const int max_width = int(max_line_width);
|
||||
const auto last_line = int(getRows());
|
||||
const auto max_width = int(max_line_width);
|
||||
|
||||
if ( xoffset >= max_width - int(width) - nf_offset )
|
||||
xoffset = max_width - int(width) - nf_offset - 1;
|
||||
|
|
|
@ -111,7 +111,7 @@ FVTerm& FVTerm::operator << (const FTermBuffer& term_buffer)
|
|||
|
||||
// public methods of FVTerm
|
||||
//----------------------------------------------------------------------
|
||||
const FPoint FVTerm::getPrintCursor()
|
||||
FPoint FVTerm::getPrintCursor()
|
||||
{
|
||||
const auto& win = getPrintArea();
|
||||
|
||||
|
@ -130,8 +130,8 @@ void FVTerm::setTermXY (int x, int y) const
|
|||
if ( term_pos->getX() == x && term_pos->getY() == y )
|
||||
return;
|
||||
|
||||
const int term_width = int(FTerm::getColumnNumber());
|
||||
const int term_height = int(FTerm::getLineNumber());
|
||||
const auto term_width = int(FTerm::getColumnNumber());
|
||||
const auto term_height = int(FTerm::getLineNumber());
|
||||
|
||||
if ( x >= term_width && term_width > 0 )
|
||||
{
|
||||
|
@ -434,7 +434,7 @@ int FVTerm::print (const std::vector<FChar>& term_string)
|
|||
int FVTerm::print (FTermArea* area, const std::vector<FChar>& term_string)
|
||||
{
|
||||
int len{0};
|
||||
const uInt tabstop = uInt(FTerm::getTabstop());
|
||||
const auto tabstop = uInt(FTerm::getTabstop());
|
||||
|
||||
if ( ! area )
|
||||
return -1;
|
||||
|
@ -734,10 +734,10 @@ void FVTerm::resizeArea ( const FRect& box
|
|||
|
||||
const int offset_left = box.getX();
|
||||
const int offset_top = box.getY();
|
||||
const int width = int(box.getWidth());
|
||||
const int height = int(box.getHeight());
|
||||
const int rsw = int(shadow.getWidth());
|
||||
const int bsh = int(shadow.getHeight());
|
||||
const auto width = int(box.getWidth());
|
||||
const auto height = int(box.getHeight());
|
||||
const auto rsw = int(shadow.getWidth());
|
||||
const auto bsh = int(shadow.getHeight());
|
||||
|
||||
assert ( offset_top >= 0 );
|
||||
assert ( width > 0 && width + rsw > 0 );
|
||||
|
@ -827,8 +827,8 @@ void FVTerm::restoreVTerm (const FRect& box)
|
|||
|
||||
int x = box.getX() - 1;
|
||||
int y = box.getY() - 1;
|
||||
int w = int(box.getWidth());
|
||||
int h = int(box.getHeight());
|
||||
auto w = int(box.getWidth());
|
||||
auto h = int(box.getHeight());
|
||||
|
||||
if ( x < 0 )
|
||||
x = 0;
|
||||
|
@ -970,8 +970,8 @@ void FVTerm::getArea (const FRect& box, const FTermArea* area)
|
|||
|
||||
const int x = box.getX();
|
||||
const int y = box.getY();
|
||||
const int w = int(box.getWidth());
|
||||
const int h = int(box.getHeight());
|
||||
const auto w = int(box.getWidth());
|
||||
const auto h = int(box.getHeight());
|
||||
const int dx = x - area->offset_left + 1;
|
||||
const int dy = y - area->offset_top + 1;
|
||||
int y_end{};
|
||||
|
@ -1040,8 +1040,8 @@ void FVTerm::putArea (const FTermArea* area) const
|
|||
for (int y{0}; y < y_end; y++) // Line loop
|
||||
{
|
||||
bool modified{false};
|
||||
int line_xmin = int(area->changes[y].xmin);
|
||||
int line_xmax = int(area->changes[y].xmax);
|
||||
auto line_xmin = int(area->changes[y].xmin);
|
||||
auto line_xmax = int(area->changes[y].xmax);
|
||||
|
||||
if ( line_xmin > line_xmax )
|
||||
continue;
|
||||
|
@ -1289,7 +1289,7 @@ void FVTerm::clearArea (FTermArea* area, int fillchar) const
|
|||
return;
|
||||
}
|
||||
|
||||
const uInt w = uInt(area->width + area->right_shadow);
|
||||
const auto w = uInt(area->width + area->right_shadow);
|
||||
|
||||
if ( area->right_shadow == 0 )
|
||||
{
|
||||
|
@ -1795,7 +1795,7 @@ bool FVTerm::isInsideArea (const FPoint& pos, const FTermArea* area)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FChar FVTerm::generateCharacter (const FPoint& pos)
|
||||
FChar FVTerm::generateCharacter (const FPoint& pos)
|
||||
{
|
||||
// Generates characters for a given position considering all areas
|
||||
|
||||
|
@ -1865,7 +1865,7 @@ const FChar FVTerm::generateCharacter (const FPoint& pos)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FChar FVTerm::getCharacter ( character_type char_type
|
||||
FChar FVTerm::getCharacter ( character_type char_type
|
||||
, const FPoint& pos
|
||||
, FVTerm* obj )
|
||||
{
|
||||
|
@ -1925,14 +1925,14 @@ const FChar FVTerm::getCharacter ( character_type char_type
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FChar FVTerm::getCoveredCharacter (const FPoint& pos, FVTerm* obj)
|
||||
FChar FVTerm::getCoveredCharacter (const FPoint& pos, FVTerm* obj)
|
||||
{
|
||||
// Gets the covered character for a given position
|
||||
return getCharacter (covered_character, pos, obj);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FChar FVTerm::getOverlappedCharacter (const FPoint& pos, FVTerm* obj)
|
||||
FChar FVTerm::getOverlappedCharacter (const FPoint& pos, FVTerm* obj)
|
||||
{
|
||||
// Gets the overlapped character for a given position
|
||||
return getCharacter (overlapped_character, pos, obj);
|
||||
|
|
|
@ -242,7 +242,7 @@ std::vector<bool>& FWidget::doubleFlatLine_ref (fc::sides side)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
const FPoint FWidget::getPrintPos()
|
||||
FPoint FWidget::getPrintPos()
|
||||
{
|
||||
const auto& cur = getPrintCursor();
|
||||
return { cur.getX() - woffset.getX1() - getX() + 1
|
||||
|
@ -721,7 +721,7 @@ void FWidget::setDoubleFlatLine (fc::sides side, int pos, bool bit)
|
|||
assert ( pos >= 1 );
|
||||
|
||||
uLong length{};
|
||||
const uLong index = uLong(pos - 1);
|
||||
const auto index = uLong(pos - 1);
|
||||
|
||||
switch ( side )
|
||||
{
|
||||
|
@ -957,6 +957,7 @@ void FWidget::show()
|
|||
show_root_widget = this;
|
||||
}
|
||||
|
||||
adjustSize(); // Alignment before drawing
|
||||
draw(); // Draw the widget
|
||||
flags.hidden = false;
|
||||
flags.shown = true;
|
||||
|
@ -1209,8 +1210,8 @@ void FWidget::setParentOffset()
|
|||
void FWidget::setTermOffset()
|
||||
{
|
||||
const auto& r = getRootWidget();
|
||||
const int w = int(r->getWidth());
|
||||
const int h = int(r->getHeight());
|
||||
const auto w = int(r->getWidth());
|
||||
const auto h = int(r->getHeight());
|
||||
woffset.setCoordinates (0, 0, w - 1, h - 1);
|
||||
}
|
||||
|
||||
|
@ -1585,55 +1586,94 @@ bool FWidget::event (FEvent* ev)
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onKeyPress (FKeyEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive key press events for the widget
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onKeyUp (FKeyEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive key up events for the widget
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onKeyDown (FKeyEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive key down events for the widget
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onMouseDown (FMouseEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive mouse down events for the widget
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onMouseUp (FMouseEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive mouse up events for the widget
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onMouseDoubleClick (FMouseEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive mouse double clicks events for the widget
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onWheel (FWheelEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive mouse wheel events for the widget
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onMouseMove (FMouseEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive mouse move events for the widget
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onFocusIn (FFocusEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive a widget focus event (get focus)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onFocusOut (FFocusEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive a widget focus event (lost focus)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onChildFocusIn (FFocusEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive a child widget focus event (get focus)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onChildFocusOut (FFocusEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive a child widget focus event (lost focus)
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onAccel (FAccelEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass to receive
|
||||
// an event when an acceleration key is pressed for this widget
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onResize (FResizeEvent* ev)
|
||||
|
@ -1646,15 +1686,23 @@ void FWidget::onResize (FResizeEvent* ev)
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onShow (FShowEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive a widget show event
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onHide (FHideEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive a widget hide event
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::onClose (FCloseEvent* ev)
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive a widget close event
|
||||
ev->accept();
|
||||
}
|
||||
|
||||
|
@ -1914,7 +1962,10 @@ bool FWidget::changeFocus ( FWidget* follower, FWidget* parent
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::draw()
|
||||
{ }
|
||||
{
|
||||
// This method must be reimplemented in a subclass
|
||||
// for drawing the widget
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWidget::drawWindows() const
|
||||
|
|
|
@ -97,7 +97,7 @@ std::size_t getHotkeyPos (const FString& src, FString& dest)
|
|||
// Find hotkey position in string
|
||||
// + generate a new string without the '&'-sign
|
||||
|
||||
constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||
constexpr auto NOT_SET = static_cast<std::size_t>(-1);
|
||||
std::size_t hotkeypos{NOT_SET};
|
||||
std::size_t i{0};
|
||||
|
||||
|
|
|
@ -815,19 +815,31 @@ bool FWindow::event (FEvent* ev)
|
|||
|
||||
//----------------------------------------------------------------------
|
||||
void FWindow::onWindowActive (FEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive activation events for this window
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWindow::onWindowInactive (FEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive deactivation events for this window
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWindow::onWindowRaised (FEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive window raising events for this window
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
void FWindow::onWindowLowered (FEvent*)
|
||||
{ }
|
||||
{
|
||||
// This event handler can be reimplemented in a subclass
|
||||
// to receive window lowering events for this window
|
||||
}
|
||||
|
||||
|
||||
// private methods of FWindow
|
||||
|
|
|
@ -62,7 +62,7 @@ public:
|
|||
// Disable copy assignment operator (=)
|
||||
emptyFString& operator = (const emptyFString&) = delete;
|
||||
|
||||
static const FString getClassName();
|
||||
static FString getClassName();
|
||||
static bool isNull();
|
||||
static const FString& get();
|
||||
static void clear();
|
||||
|
@ -74,7 +74,7 @@ private:
|
|||
|
||||
// emptyFString inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString emptyFString::getClassName()
|
||||
inline FString emptyFString::getClassName()
|
||||
{ return "emptyFString"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -110,7 +110,7 @@ class FApplication : public FWidget
|
|||
FApplication& operator = (const FApplication&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
int getArgc() const;
|
||||
char** getArgv() const;
|
||||
static FApplication* getApplicationObject();
|
||||
|
@ -229,7 +229,7 @@ FApplication* getFApplication();
|
|||
|
||||
// FApplication inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FApplication::getClassName() const
|
||||
inline FString FApplication::getClassName() const
|
||||
{ return "FApplication"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -82,7 +82,7 @@ class FBusyIndicator : public FToolTip
|
|||
FBusyIndicator& operator = (const FBusyIndicator&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
// Inquiries
|
||||
bool isRunning() const;
|
||||
|
@ -113,7 +113,7 @@ class FBusyIndicator : public FToolTip
|
|||
|
||||
// FBusyIndicator inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FBusyIndicator::getClassName() const
|
||||
inline FString FBusyIndicator::getClassName() const
|
||||
{ return "FBusyIndicator"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -77,7 +77,7 @@ class FButton : public FWidget
|
|||
FButton& operator = (const FString&);
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
FString getText() const;
|
||||
|
||||
// Mutators
|
||||
|
@ -134,7 +134,7 @@ class FButton : public FWidget
|
|||
|
||||
private:
|
||||
// Constants
|
||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||
static constexpr auto NOT_SET = static_cast<std::size_t>(-1);
|
||||
|
||||
// Methods
|
||||
void init();
|
||||
|
@ -174,7 +174,7 @@ class FButton : public FWidget
|
|||
|
||||
// FButton inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FButton::getClassName() const
|
||||
inline FString FButton::getClassName() const
|
||||
{ return "FButton"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -78,7 +78,7 @@ class FButtonGroup : public FScrollView
|
|||
FButtonGroup& operator = (const FButtonGroup&) = delete;
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
FToggleButton* getFirstButton();
|
||||
FToggleButton* getLastButton();
|
||||
FToggleButton* getButton (int) const;
|
||||
|
@ -119,7 +119,7 @@ class FButtonGroup : public FScrollView
|
|||
|
||||
private:
|
||||
// Constants
|
||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||
static constexpr auto NOT_SET = static_cast<std::size_t>(-1);
|
||||
|
||||
// Inquiries
|
||||
bool isRadioButton (const FToggleButton*) const;
|
||||
|
@ -139,7 +139,7 @@ class FButtonGroup : public FScrollView
|
|||
|
||||
// FButtonGroup inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FButtonGroup::getClassName() const
|
||||
inline FString FButtonGroup::getClassName() const
|
||||
{ return "FButtonGroup"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -147,7 +147,7 @@ class FCallback
|
|||
FCallback& operator = (const FCallback&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const;
|
||||
FString getClassName() const;
|
||||
std::size_t getCallbackCount() const;
|
||||
|
||||
// Methods
|
||||
|
@ -220,7 +220,7 @@ class FCallback
|
|||
|
||||
// FCallback inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FCallback::getClassName() const
|
||||
inline FString FCallback::getClassName() const
|
||||
{ return "FCallback"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -36,17 +36,10 @@ namespace finalcut
|
|||
namespace fc
|
||||
{
|
||||
|
||||
extern uInt character[][fc::NUM_OF_ENCODINGS];
|
||||
extern const std::size_t last_char_item;
|
||||
|
||||
extern const int vt100_key_to_utf8[][2];
|
||||
extern const std::size_t last_key_item;
|
||||
|
||||
extern const wchar_t cp437_ucs[][2];
|
||||
extern const std::size_t last_cp437_item;
|
||||
|
||||
extern const wchar_t halfwidth_fullwidth[][2];
|
||||
extern const std::size_t last_halfwidth_item;
|
||||
extern std::array<std::array<uInt, fc::NUM_OF_ENCODINGS>, 115> character;
|
||||
extern const std::array<std::array<int, 2>, 39> vt100_key_to_utf8;
|
||||
extern const std::array<std::array<wchar_t, 2>, 256> cp437_ucs;
|
||||
extern const std::array<std::array<wchar_t, 2>, 227> halfwidth_fullwidth;
|
||||
|
||||
} // namespace fc
|
||||
|
||||
|
|
|
@ -78,7 +78,7 @@ class FCheckBox : public FToggleButton
|
|||
FCheckBox& operator = (const FCheckBox&) = delete;
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
private:
|
||||
// Methods
|
||||
|
@ -91,7 +91,7 @@ class FCheckBox : public FToggleButton
|
|||
|
||||
// FCheckBox inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FCheckBox::getClassName() const
|
||||
inline FString FCheckBox::getClassName() const
|
||||
{ return "FCheckBox"; }
|
||||
|
||||
} // namespace finalcut
|
||||
|
|
|
@ -78,7 +78,7 @@ class FCheckMenuItem : public FMenuItem
|
|||
FCheckMenuItem& operator = (const FCheckMenuItem&) = delete;
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
private:
|
||||
// Methods
|
||||
|
@ -89,7 +89,7 @@ class FCheckMenuItem : public FMenuItem
|
|||
|
||||
// FCheckMenuItem inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FCheckMenuItem::getClassName() const
|
||||
inline FString FCheckMenuItem::getClassName() const
|
||||
{ return "FCheckMenuItem"; }
|
||||
|
||||
} // namespace finalcut
|
||||
|
|
|
@ -65,7 +65,7 @@ class FColorPair
|
|||
FColorPair& operator = (const FColorPair& pair) = default;
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const
|
||||
FString getClassName() const
|
||||
{ return "FColorPair"; }
|
||||
|
||||
FColor getForegroundColor() const
|
||||
|
|
|
@ -59,7 +59,7 @@ class FColorPalette
|
|||
virtual ~FColorPalette();
|
||||
|
||||
// Accessor
|
||||
virtual const FString getClassName() const;
|
||||
virtual FString getClassName() const;
|
||||
|
||||
// Methods
|
||||
virtual void setColorPalette() = 0;
|
||||
|
@ -76,7 +76,7 @@ class FColorPalette
|
|||
|
||||
// FColorPalette inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FColorPalette::getClassName() const
|
||||
inline FString FColorPalette::getClassName() const
|
||||
{ return "FColorPalette"; }
|
||||
|
||||
|
||||
|
@ -107,7 +107,7 @@ class default8ColorPalette final : public FColorPalette
|
|||
~default8ColorPalette();
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
// Methods
|
||||
void setColorPalette() override;
|
||||
|
@ -116,7 +116,7 @@ class default8ColorPalette final : public FColorPalette
|
|||
|
||||
// default8ColorPalette inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString default8ColorPalette::getClassName() const
|
||||
inline FString default8ColorPalette::getClassName() const
|
||||
{ return "default8ColorPalette"; }
|
||||
|
||||
|
||||
|
@ -147,7 +147,7 @@ class default16ColorPalette final : public FColorPalette
|
|||
~default16ColorPalette();
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
// Methods
|
||||
void setColorPalette() override;
|
||||
|
@ -156,7 +156,7 @@ class default16ColorPalette final : public FColorPalette
|
|||
|
||||
// default16ColorPalette inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString default16ColorPalette::getClassName() const
|
||||
inline FString default16ColorPalette::getClassName() const
|
||||
{ return "default16ColorPalette"; }
|
||||
|
||||
/* Inheritance diagram
|
||||
|
@ -186,7 +186,7 @@ class default16DarkColorPalette final : public FColorPalette
|
|||
~default16DarkColorPalette();
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
// Methods
|
||||
void setColorPalette() override;
|
||||
|
@ -195,7 +195,7 @@ class default16DarkColorPalette final : public FColorPalette
|
|||
|
||||
// default16ColorPalette inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString default16DarkColorPalette::getClassName() const
|
||||
inline FString default16DarkColorPalette::getClassName() const
|
||||
{ return "default16DarkColorPalette"; }
|
||||
|
||||
} // namespace finalcut
|
||||
|
|
|
@ -84,7 +84,7 @@ class FDropDownListBox : public FWindow
|
|||
FDropDownListBox& operator = (const FDropDownListBox&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
// Mutators
|
||||
void setGeometry ( const FPoint&, const FSize&
|
||||
|
@ -115,7 +115,7 @@ class FDropDownListBox : public FWindow
|
|||
|
||||
// FDropDownListBox inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FDropDownListBox::getClassName() const
|
||||
inline FString FDropDownListBox::getClassName() const
|
||||
{ return "FDropDownListBox"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -148,7 +148,7 @@ class FComboBox : public FWidget
|
|||
// Overloaded operators
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
std::size_t getCount() const;
|
||||
FString getText() const;
|
||||
template <typename DT>
|
||||
|
@ -239,7 +239,7 @@ bool closeComboBox (FDropDownListBox*, const FPoint&);
|
|||
|
||||
// FComboBox inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FComboBox::getClassName() const
|
||||
inline FString FComboBox::getClassName() const
|
||||
{ return "FComboBox"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -124,7 +124,7 @@ class FDataAccess
|
|||
virtual ~FDataAccess();
|
||||
|
||||
// Accessors
|
||||
virtual const FString getClassName() const
|
||||
virtual FString getClassName() const
|
||||
{
|
||||
return "FDataAccess";
|
||||
}
|
||||
|
@ -225,7 +225,7 @@ class FData : public FDataAccess
|
|||
}
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override
|
||||
FString getClassName() const override
|
||||
{
|
||||
return "FData";
|
||||
}
|
||||
|
|
|
@ -91,8 +91,8 @@ class FDialog : public FWindow
|
|||
FDialog& operator = (const FDialog&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
virtual const FString getText() const;
|
||||
FString getClassName() const override;
|
||||
virtual FString getText() const;
|
||||
|
||||
// Mutators
|
||||
bool setDialogWidget (bool);
|
||||
|
@ -200,6 +200,8 @@ class FDialog : public FWindow
|
|||
void raiseActivateDialog();
|
||||
void lowerActivateDialog();
|
||||
bool isOutsideTerminal (const FPoint&) const;
|
||||
bool isLeftOutside();
|
||||
bool isBottomOutside();
|
||||
bool isLowerRightResizeCorner (const mouseStates&) const;
|
||||
void resizeMouseDown (const mouseStates&);
|
||||
void resizeMouseUpMove (const mouseStates&, bool = false);
|
||||
|
@ -237,11 +239,11 @@ class FDialog : public FWindow
|
|||
|
||||
// FDialog inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FDialog::getClassName() const
|
||||
inline FString FDialog::getClassName() const
|
||||
{ return "FDialog"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FDialog::getText() const
|
||||
inline FString FDialog::getText() const
|
||||
{ return tb_text; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -84,7 +84,7 @@ class FDialogListMenu : public FMenu
|
|||
FDialogListMenu& operator = (const FDialogListMenu&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
private:
|
||||
// Method
|
||||
|
@ -94,7 +94,7 @@ class FDialogListMenu : public FMenu
|
|||
|
||||
// FDialogListMenu inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FDialogListMenu::getClassName() const
|
||||
inline FString FDialogListMenu::getClassName() const
|
||||
{ return "FDialogListMenu"; }
|
||||
|
||||
} // namespace finalcut
|
||||
|
|
|
@ -80,6 +80,8 @@
|
|||
#error "Only <final/final.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
|
||||
#include "final/fc.h"
|
||||
#include "final/fdata.h"
|
||||
#include "final/fpoint.h"
|
||||
|
@ -185,9 +187,9 @@ class FWheelEvent : public FEvent // wheel event
|
|||
int getWheel() const;
|
||||
|
||||
private:
|
||||
FPoint p;
|
||||
FPoint tp;
|
||||
int w;
|
||||
FPoint p{};
|
||||
FPoint tp{};
|
||||
int w{};
|
||||
};
|
||||
|
||||
|
||||
|
@ -354,9 +356,12 @@ class FUserEvent : public FEvent // user event
|
|||
void setData (T&&);
|
||||
|
||||
private:
|
||||
// Using-declaration
|
||||
using FDataAccessPtr = std::shared_ptr<FDataAccess>;
|
||||
|
||||
// Data members
|
||||
int uid{0};
|
||||
FDataAccess* data_pointer{nullptr};
|
||||
bool external_data_pointer{false};
|
||||
FDataAccessPtr data_pointer{nullptr};
|
||||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -377,15 +382,14 @@ inline clean_fdata_t<T>& FUserEvent::getData() const
|
|||
template <typename T>
|
||||
inline void FUserEvent::setFDataObject (T&& fdata)
|
||||
{
|
||||
external_data_pointer = true;
|
||||
data_pointer = &(std::forward<T>(fdata));
|
||||
data_pointer.reset(&(std::forward<T>(fdata)));
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
template <typename T>
|
||||
inline void FUserEvent::setData (T&& data)
|
||||
{
|
||||
external_data_pointer = false;
|
||||
data_pointer = makeFData(std::forward<T>(data));
|
||||
data_pointer.reset(makeFData(std::forward<T>(data)));
|
||||
}
|
||||
|
||||
} // namespace finalcut
|
||||
|
|
|
@ -112,10 +112,10 @@ class FFileDialog : public FDialog
|
|||
FFileDialog& operator = (const FFileDialog&);
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
const FString getPath() const;
|
||||
const FString getFilter() const;
|
||||
const FString getSelectedFile() const;
|
||||
FString getClassName() const override;
|
||||
FString getPath() const;
|
||||
FString getFilter() const;
|
||||
FString getSelectedFile() const;
|
||||
bool getShowHiddenFiles() const;
|
||||
|
||||
// Mutators
|
||||
|
@ -129,10 +129,10 @@ class FFileDialog : public FDialog
|
|||
void onKeyPress (FKeyEvent*) override;
|
||||
|
||||
// Methods
|
||||
static const FString fileOpenChooser ( FWidget*
|
||||
static FString fileOpenChooser ( FWidget*
|
||||
, const FString& = FString()
|
||||
, const FString& = FString() );
|
||||
static const FString fileSaveChooser ( FWidget*
|
||||
static FString fileSaveChooser ( FWidget*
|
||||
, const FString& = FString()
|
||||
, const FString& = FString() );
|
||||
|
||||
|
@ -203,7 +203,7 @@ class FFileDialog : public FDialog
|
|||
void selectDirectoryEntry (const char* const);
|
||||
int changeDir (const FString&);
|
||||
void printPath (const FString&);
|
||||
static const FString getHomeDir();
|
||||
static FString getHomeDir();
|
||||
|
||||
// Callback methods
|
||||
void cb_processActivate();
|
||||
|
@ -232,7 +232,7 @@ class FFileDialog : public FDialog
|
|||
, const FFileDialog::FDirEntry& );
|
||||
friend bool sortDirFirst ( const FFileDialog::FDirEntry&
|
||||
, const FFileDialog::FDirEntry& );
|
||||
friend const FString fileChooser ( FWidget*
|
||||
friend FString fileChooser ( FWidget*
|
||||
, const FString&
|
||||
, const FString&
|
||||
, FFileDialog::DialogType);
|
||||
|
@ -240,15 +240,15 @@ class FFileDialog : public FDialog
|
|||
|
||||
// FMessageBox inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FFileDialog::getClassName() const
|
||||
inline FString FFileDialog::getClassName() const
|
||||
{ return "FFileDialog"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FFileDialog::getPath() const
|
||||
inline FString FFileDialog::getPath() const
|
||||
{ return directory; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FFileDialog::getFilter() const
|
||||
inline FString FFileDialog::getFilter() const
|
||||
{ return filter_pattern; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -33,9 +33,9 @@ namespace finalcut
|
|||
namespace fc
|
||||
{
|
||||
|
||||
extern FKeyMap fkey[];
|
||||
extern const FMetakeyMap fmetakey[];
|
||||
extern const FKeyName fkeyname[];
|
||||
extern std::array<FKeyMap, 174> fkey;
|
||||
extern const std::array<FMetakeyMap, 228> fmetakey;
|
||||
extern const std::array<FKeyName, 388> fkeyname;
|
||||
|
||||
} // namespace fc
|
||||
|
||||
|
|
|
@ -36,7 +36,11 @@
|
|||
#endif
|
||||
|
||||
#include <sys/time.h>
|
||||
|
||||
#include <array>
|
||||
#include <functional>
|
||||
#include <memory>
|
||||
|
||||
#include "final/fstring.h"
|
||||
#include "final/ftypes.h"
|
||||
|
||||
|
@ -99,16 +103,17 @@ class FKeyboard final
|
|||
FKeyboard& operator = (const FKeyboard&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const;
|
||||
FString getClassName() const;
|
||||
FKey getKey() const;
|
||||
const FString getKeyName (const FKey) const;
|
||||
FString getKeyName (const FKey) const;
|
||||
keybuffer& getKeyBuffer();
|
||||
timeval* getKeyPressedTime();
|
||||
static uInt64 getKeypressTimeout();
|
||||
static uInt64 getReadBlockingTime();
|
||||
|
||||
// Mutators
|
||||
void setTermcapMap (fc::FKeyMap*);
|
||||
template <typename T>
|
||||
void setTermcapMap (const T&);
|
||||
static void setKeypressTimeout (const uInt64);
|
||||
static void setReadBlockingTime (const uInt64);
|
||||
void enableUTF8();
|
||||
|
@ -132,6 +137,9 @@ class FKeyboard final
|
|||
void escapeKeyHandling();
|
||||
|
||||
private:
|
||||
// Using-declaration
|
||||
using FKeyMapPtr = std::shared_ptr<std::array<fc::FKeyMap, 174>>;
|
||||
|
||||
// Constants
|
||||
static constexpr FKey NOT_SET = static_cast<FKey>(-1);
|
||||
|
||||
|
@ -176,7 +184,7 @@ class FKeyboard final
|
|||
static uInt64 read_blocking_time;
|
||||
static uInt64 key_timeout;
|
||||
static uInt64 interval_timeout;
|
||||
fc::FKeyMap* key_map{nullptr};
|
||||
FKeyMapPtr key_map{};
|
||||
FKey key{0};
|
||||
uChar read_character{};
|
||||
char fifo_buf[FIFO_BUF_SIZE]{'\0'};
|
||||
|
@ -191,7 +199,7 @@ class FKeyboard final
|
|||
|
||||
// FKeyboard inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FKeyboard::getClassName() const
|
||||
inline FString FKeyboard::getClassName() const
|
||||
{ return "FKeyboard"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -214,6 +222,11 @@ inline uInt64 FKeyboard::getKeypressTimeout()
|
|||
inline uInt64 FKeyboard::getReadBlockingTime()
|
||||
{ return read_blocking_time; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
template <typename T>
|
||||
inline void FKeyboard::setTermcapMap (const T& keymap)
|
||||
{ key_map = std::make_shared<T>(keymap); }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline void FKeyboard::setKeypressTimeout (const uInt64 timeout)
|
||||
{ key_timeout = timeout; }
|
||||
|
|
|
@ -87,7 +87,7 @@ class FLabel : public FWidget
|
|||
const FLabel& operator >> (FString&) const;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
FWidget* getAccelWidget();
|
||||
fc::text_alignment getAlignment() const;
|
||||
FString& getText();
|
||||
|
@ -127,7 +127,7 @@ class FLabel : public FWidget
|
|||
|
||||
private:
|
||||
// Constants
|
||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||
static constexpr auto NOT_SET = static_cast<std::size_t>(-1);
|
||||
|
||||
// Methods
|
||||
void init();
|
||||
|
@ -165,7 +165,7 @@ inline FLabel& FLabel::operator << (const typeT& s)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FLabel::getClassName() const
|
||||
inline FString FLabel::getClassName() const
|
||||
{ return "FLabel"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -103,7 +103,7 @@ class FLineEdit : public FWidget
|
|||
const FLineEdit& operator >> (FString&) const;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
FString getText() const;
|
||||
std::size_t getMaxLength() const;
|
||||
std::size_t getCursorPosition() const;
|
||||
|
@ -175,7 +175,7 @@ class FLineEdit : public FWidget
|
|||
};
|
||||
|
||||
// Constants
|
||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||
static constexpr auto NOT_SET = static_cast<std::size_t>(-1);
|
||||
|
||||
// Methods
|
||||
void init();
|
||||
|
@ -237,7 +237,7 @@ inline FLineEdit& FLineEdit::operator << (const typeT& s)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FLineEdit::getClassName() const
|
||||
inline FString FLineEdit::getClassName() const
|
||||
{ return "FLineEdit"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#error "Only <final/final.h> can be included directly."
|
||||
#endif
|
||||
|
||||
#include <memory>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
||||
|
@ -83,7 +84,7 @@ class FListBoxItem
|
|||
FListBoxItem& operator = (const FListBoxItem&);
|
||||
|
||||
// Accessors
|
||||
virtual const FString getClassName() const;
|
||||
virtual FString getClassName() const;
|
||||
virtual FString getText() const;
|
||||
template <typename DT>
|
||||
clean_fdata_t<DT>& getData() const;
|
||||
|
@ -97,9 +98,12 @@ class FListBoxItem
|
|||
void clear();
|
||||
|
||||
private:
|
||||
// Using-declaration
|
||||
using FDataAccessPtr = std::shared_ptr<FDataAccess>;
|
||||
|
||||
// Data members
|
||||
FString text{};
|
||||
FDataAccess* data_pointer{nullptr};
|
||||
FDataAccessPtr data_pointer{};
|
||||
fc::brackets_type brackets{fc::NoBrackets};
|
||||
bool selected{false};
|
||||
|
||||
|
@ -117,7 +121,7 @@ inline FListBoxItem::FListBoxItem (const FString& txt, DT&& data)
|
|||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FListBoxItem::getClassName() const
|
||||
inline FString FListBoxItem::getClassName() const
|
||||
{ return "FListBoxItem"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -139,7 +143,8 @@ inline void FListBoxItem::setText (const FString& txt)
|
|||
template <typename DT>
|
||||
inline void FListBoxItem::setData (DT&& data)
|
||||
{
|
||||
data_pointer = makeFData(std::forward<DT>(data));
|
||||
const auto data_obj = makeFData(std::forward<DT>(data));
|
||||
data_pointer.reset(data_obj);
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -179,7 +184,7 @@ class FListBox : public FWidget
|
|||
FListBox& operator = (const FListBox&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
std::size_t getCount() const;
|
||||
FListBoxItem& getItem (std::size_t);
|
||||
const FListBoxItem& getItem (std::size_t) const;
|
||||
|
@ -415,7 +420,7 @@ inline FListBox::FListBox ( Container container
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FListBox::getClassName() const
|
||||
inline FString FListBox::getClassName() const
|
||||
{ return "FListBox"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -48,6 +48,7 @@
|
|||
#endif
|
||||
|
||||
#include <list>
|
||||
#include <memory>
|
||||
#include <stack>
|
||||
#include <unordered_map>
|
||||
#include <vector>
|
||||
|
@ -86,7 +87,7 @@ class FListViewItem : public FObject
|
|||
FListViewItem& operator = (const FListViewItem&);
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
uInt getColumnCount() const;
|
||||
int getSortColumn() const;
|
||||
FString getText (int) const;
|
||||
|
@ -113,6 +114,9 @@ class FListViewItem : public FObject
|
|||
void collapse();
|
||||
|
||||
private:
|
||||
// Using-declaration
|
||||
using FDataAccessPtr = std::shared_ptr<FDataAccess>;
|
||||
|
||||
// Inquiry
|
||||
bool isExpandable() const;
|
||||
bool isCheckable() const;
|
||||
|
@ -127,7 +131,7 @@ class FListViewItem : public FObject
|
|||
|
||||
// Data members
|
||||
FStringList column_list{};
|
||||
FDataAccess* data_pointer{nullptr};
|
||||
FDataAccessPtr data_pointer{};
|
||||
iterator root{};
|
||||
std::size_t visible_lines{1};
|
||||
bool expandable{false};
|
||||
|
@ -159,7 +163,7 @@ inline FListViewItem::FListViewItem ( const FStringList& cols
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FListViewItem::getClassName() const
|
||||
inline FString FListViewItem::getClassName() const
|
||||
{ return "FListViewItem"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -177,7 +181,8 @@ inline clean_fdata_t<DT>& FListViewItem::getData() const
|
|||
template <typename DT>
|
||||
inline void FListViewItem::setData (DT&& data)
|
||||
{
|
||||
data_pointer = makeFData(std::forward<DT>(data));
|
||||
const auto data_obj = makeFData(std::forward<DT>(data));
|
||||
data_pointer = data_obj;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -237,7 +242,7 @@ class FListViewIterator
|
|||
bool operator != (const FListViewIterator&) const;
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const;
|
||||
FString getClassName() const;
|
||||
int& getPosition();
|
||||
|
||||
// Methods
|
||||
|
@ -273,7 +278,7 @@ inline bool FListViewIterator::operator != (const FListViewIterator& rhs) const
|
|||
{ return node != rhs.node; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FListViewIterator::getClassName() const
|
||||
inline FString FListViewIterator::getClassName() const
|
||||
{ return "FListViewIterator"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -304,7 +309,7 @@ class FListView : public FWidget
|
|||
FListView& operator = (const FListView&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
std::size_t getCount() const;
|
||||
fc::text_alignment getColumnAlignment (int) const;
|
||||
FString getColumnText (int) const;
|
||||
|
@ -545,7 +550,7 @@ struct FListView::Header
|
|||
|
||||
// FListView inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FListView::getClassName() const
|
||||
inline FString FListView::getClassName() const
|
||||
{ return "FListView"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -84,7 +84,7 @@ class FLog : public std::stringbuf
|
|||
FLog& operator << (IOManip);
|
||||
FLog& operator << (LogLevel);
|
||||
|
||||
virtual const FString getClassName() const;
|
||||
virtual FString getClassName() const;
|
||||
virtual void info (const std::string&) = 0;
|
||||
virtual void warn (const std::string&) = 0;
|
||||
virtual void error (const std::string&) = 0;
|
||||
|
@ -130,7 +130,7 @@ inline FLog& FLog::operator << (IOManip pf)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FLog::getClassName() const
|
||||
inline FString FLog::getClassName() const
|
||||
{ return "FLog"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -72,7 +72,7 @@ class FLogger : public FLog
|
|||
~FLogger() override;
|
||||
|
||||
// Methods
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
void info (const std::string&) override;
|
||||
void warn (const std::string&) override;
|
||||
void error (const std::string&) override;
|
||||
|
@ -86,8 +86,8 @@ class FLogger : public FLog
|
|||
private:
|
||||
// Methods
|
||||
void newlineReplace (std::string&, const std::string&) const;
|
||||
const std::string getTimeString() const;
|
||||
const std::string getEOL() const;
|
||||
std::string getTimeString() const;
|
||||
std::string getEOL() const;
|
||||
void printLogLine (const std::string&);
|
||||
|
||||
// Data member
|
||||
|
@ -97,7 +97,7 @@ class FLogger : public FLog
|
|||
|
||||
// FLogger inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FLogger::getClassName() const
|
||||
inline FString FLogger::getClassName() const
|
||||
{ return "FLogger"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -91,7 +91,7 @@ class FMenu : public FWindow, public FMenuList
|
|||
FMenu& operator = (const FMenu&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
FString getText() const;
|
||||
FMenuItem* getItem();
|
||||
|
||||
|
@ -133,7 +133,7 @@ class FMenu : public FWindow, public FMenuList
|
|||
|
||||
private:
|
||||
// Constants
|
||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||
static constexpr auto NOT_SET = static_cast<std::size_t>(-1);
|
||||
static constexpr bool SELECT_ITEM = true;
|
||||
|
||||
// Typedef
|
||||
|
@ -248,7 +248,7 @@ std::tuple<bool, bool> closeOpenMenus (FMenu*, const FPoint&);
|
|||
|
||||
// FMenu inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FMenu::getClassName() const
|
||||
inline FString FMenu::getClassName() const
|
||||
{ return "FMenu"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -83,7 +83,7 @@ class FMenuBar : public FWindow, public FMenuList
|
|||
FMenuBar& operator = (const FMenuBar&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
// Methods
|
||||
void resetColors() override;
|
||||
|
@ -103,7 +103,7 @@ class FMenuBar : public FWindow, public FMenuList
|
|||
|
||||
private:
|
||||
// Constants
|
||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||
static constexpr auto NOT_SET = static_cast<std::size_t>(-1);
|
||||
|
||||
// Typedef
|
||||
typedef struct
|
||||
|
@ -157,7 +157,7 @@ class FMenuBar : public FWindow, public FMenuList
|
|||
|
||||
// FMenuBar inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FMenuBar::getClassName() const
|
||||
inline FString FMenuBar::getClassName() const
|
||||
{ return "FMenuBar"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -88,7 +88,7 @@ class FMenuItem : public FWidget
|
|||
FMenuItem& operator = (const FMenuItem&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
FKey getHotkey() const;
|
||||
FMenu* getMenu() const;
|
||||
std::size_t getTextLength() const;
|
||||
|
@ -196,7 +196,7 @@ class FMenuItem : public FWidget
|
|||
|
||||
// FMenuItem inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FMenuItem::getClassName() const
|
||||
inline FString FMenuItem::getClassName() const
|
||||
{ return "FMenuItem"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -71,7 +71,7 @@ class FMenuList
|
|||
FMenuList& operator = (const FMenuList&) = delete;
|
||||
|
||||
// Accessors
|
||||
virtual const FString getClassName() const;
|
||||
virtual FString getClassName() const;
|
||||
std::size_t getCount() const;
|
||||
FMenuItem* getItem (int) const;
|
||||
FMenuItem* getSelectedItem() const;
|
||||
|
@ -104,7 +104,7 @@ class FMenuList
|
|||
|
||||
// FMenuList inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FMenuList::getClassName() const
|
||||
inline FString FMenuList::getClassName() const
|
||||
{ return "FMenuList"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -92,7 +92,7 @@ class FMessageBox : public FDialog
|
|||
explicit FMessageBox (FWidget* = nullptr);
|
||||
FMessageBox (const FMessageBox&); // copy constructor
|
||||
FMessageBox ( const FString&, const FString&
|
||||
, int, int, int
|
||||
, ButtonType, ButtonType, ButtonType
|
||||
, FWidget* = nullptr );
|
||||
// Destructor
|
||||
~FMessageBox() override;
|
||||
|
@ -101,10 +101,10 @@ class FMessageBox : public FDialog
|
|||
FMessageBox& operator = (const FMessageBox&);
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const override;
|
||||
const FString getTitlebarText() const;
|
||||
const FString getHeadline() const;
|
||||
const FString getText() const override;
|
||||
FString getClassName() const override;
|
||||
FString getTitlebarText() const;
|
||||
FString getHeadline() const;
|
||||
FString getText() const override;
|
||||
|
||||
// Mutator
|
||||
void setTitlebarText (const FString&);
|
||||
|
@ -119,22 +119,22 @@ class FMessageBox : public FDialog
|
|||
static int info ( FWidget*
|
||||
, const FString&
|
||||
, const messageType&
|
||||
, int = FMessageBox::Ok
|
||||
, int = 0
|
||||
, int = 0 );
|
||||
, ButtonType = FMessageBox::Ok
|
||||
, ButtonType = FMessageBox::Reject
|
||||
, ButtonType = FMessageBox::Reject );
|
||||
|
||||
template <typename messageType>
|
||||
static int error ( FWidget*
|
||||
, const messageType&
|
||||
, int = FMessageBox::Ok
|
||||
, int = 0
|
||||
, int = 0 );
|
||||
, ButtonType = FMessageBox::Ok
|
||||
, ButtonType = FMessageBox::Reject
|
||||
, ButtonType = FMessageBox::Reject );
|
||||
protected:
|
||||
// Method
|
||||
void adjustSize() override;
|
||||
|
||||
// Callback method
|
||||
void cb_processClick (int);
|
||||
void cb_processClick (ButtonType);
|
||||
|
||||
private:
|
||||
// Constants
|
||||
|
@ -157,7 +157,7 @@ class FMessageBox : public FDialog
|
|||
FButton* button[MAX_BUTTONS]{nullptr};
|
||||
std::size_t max_line_width{0};
|
||||
FColor emphasis_color{getColorTheme()->dialog_emphasis_fg};
|
||||
int button_digit[MAX_BUTTONS]{0};
|
||||
ButtonType button_digit[MAX_BUTTONS]{FMessageBox::Reject};
|
||||
std::size_t num_buttons{0};
|
||||
std::size_t text_num_lines{0};
|
||||
bool center_text{false};
|
||||
|
@ -166,22 +166,22 @@ class FMessageBox : public FDialog
|
|||
|
||||
// FMessageBox inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FMessageBox::getClassName() const
|
||||
inline FString FMessageBox::getClassName() const
|
||||
{ return "FMessageBox"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FMessageBox::getTitlebarText() const
|
||||
inline FString FMessageBox::getTitlebarText() const
|
||||
{
|
||||
const FString& title = FDialog::getText(); // initialize text
|
||||
return title;
|
||||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FMessageBox::getHeadline() const
|
||||
inline FString FMessageBox::getHeadline() const
|
||||
{ return headline_text; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FMessageBox::getText() const
|
||||
inline FString FMessageBox::getText() const
|
||||
{ return text; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -205,9 +205,9 @@ template <typename messageType>
|
|||
int FMessageBox::info ( FWidget* parent
|
||||
, const FString& caption
|
||||
, const messageType& message
|
||||
, int button0
|
||||
, int button1
|
||||
, int button2 )
|
||||
, ButtonType button0
|
||||
, ButtonType button1
|
||||
, ButtonType button2 )
|
||||
{
|
||||
FMessageBox mbox ( caption
|
||||
, FString() << message
|
||||
|
@ -221,9 +221,9 @@ int FMessageBox::info ( FWidget* parent
|
|||
template <typename messageType>
|
||||
int FMessageBox::error ( FWidget* parent
|
||||
, const messageType& message
|
||||
, int button0
|
||||
, int button1
|
||||
, int button2 )
|
||||
, ButtonType button0
|
||||
, ButtonType button1
|
||||
, ButtonType button2 )
|
||||
{
|
||||
const FString caption{"Error message"};
|
||||
|
||||
|
|
|
@ -102,7 +102,7 @@ class FMouse
|
|||
{ }
|
||||
|
||||
// Accessors
|
||||
virtual const FString getClassName() const;
|
||||
virtual FString getClassName() const;
|
||||
const FPoint& getPos() const;
|
||||
void clearEvent();
|
||||
|
||||
|
@ -215,7 +215,7 @@ class FMouseGPM final : public FMouse
|
|||
~FMouseGPM() override;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
// Mutators
|
||||
void setStdinNo(int);
|
||||
|
@ -283,7 +283,7 @@ class FMouseX11 final : public FMouse
|
|||
~FMouseX11() override = default;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
// Inquiry
|
||||
bool hasData() override;
|
||||
|
@ -342,7 +342,7 @@ class FMouseSGR final : public FMouse
|
|||
~FMouseSGR() override = default;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
// Inquiry
|
||||
bool hasData() override;
|
||||
|
@ -401,7 +401,7 @@ class FMouseUrxvt final : public FMouse
|
|||
~FMouseUrxvt() override = default;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
// Inquiry
|
||||
bool hasData() override;
|
||||
|
@ -466,7 +466,7 @@ class FMouseControl
|
|||
FMouseControl& operator = (const FMouseControl&) = delete;
|
||||
|
||||
// Accessors
|
||||
virtual const FString getClassName() const;
|
||||
virtual FString getClassName() const;
|
||||
const FPoint& getPos();
|
||||
void clearEvent();
|
||||
|
||||
|
@ -526,7 +526,7 @@ class FMouseControl
|
|||
|
||||
// FMouseControl inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FMouseControl::getClassName() const
|
||||
inline FString FMouseControl::getClassName() const
|
||||
{ return "FMouseControl"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -79,7 +79,7 @@ class FObject
|
|||
typedef FObjectList::const_iterator const_iterator;
|
||||
|
||||
// Constants
|
||||
static constexpr std::size_t UNLIMITED = static_cast<std::size_t>(-1);
|
||||
static constexpr auto UNLIMITED = static_cast<std::size_t>(-1);
|
||||
|
||||
// Constructor
|
||||
explicit FObject (FObject* = nullptr);
|
||||
|
@ -94,7 +94,7 @@ class FObject
|
|||
FObject& operator = (const FObject&) = delete;
|
||||
|
||||
// Accessors
|
||||
virtual const FString getClassName() const;
|
||||
virtual FString getClassName() const;
|
||||
FObject* getParent() const;
|
||||
FObject* getChild (int) const;
|
||||
FObjectList& getChildren();
|
||||
|
@ -176,7 +176,7 @@ class FObject
|
|||
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FObject::getClassName() const
|
||||
inline FString FObject::getClassName() const
|
||||
{ return "FObject"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -107,7 +107,7 @@ class FOptiAttr final
|
|||
FOptiAttr& operator = (const FOptiAttr&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const;
|
||||
FString getClassName() const;
|
||||
|
||||
// Mutators
|
||||
void setTermEnvironment (const termEnv&);
|
||||
|
@ -318,7 +318,7 @@ class FOptiAttr final
|
|||
|
||||
// FOptiAttr inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FOptiAttr::getClassName() const
|
||||
inline FString FOptiAttr::getClassName() const
|
||||
{ return "FOptiAttr"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -92,7 +92,7 @@ class FOptiMove final
|
|||
~FOptiMove();
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const;
|
||||
FString getClassName() const;
|
||||
uInt getCursorHomeLength() const;
|
||||
uInt getCarriageReturnLength() const;
|
||||
uInt getCursorToLLLength() const;
|
||||
|
@ -224,7 +224,7 @@ class FOptiMove final
|
|||
|
||||
// FOptiMove inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FOptiMove::getClassName() const
|
||||
inline FString FOptiMove::getClassName() const
|
||||
{ return "FOptiMove"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -66,7 +66,7 @@ class FPoint
|
|||
FPoint& operator -= (const FPoint&);
|
||||
|
||||
// Accessors
|
||||
virtual const FString getClassName();
|
||||
virtual FString getClassName();
|
||||
int getX() const;
|
||||
int getY() const;
|
||||
void setX (int);
|
||||
|
@ -93,9 +93,9 @@ class FPoint
|
|||
// Friend operator functions
|
||||
friend bool operator == (const FPoint&, const FPoint&);
|
||||
friend bool operator != (const FPoint&, const FPoint&);
|
||||
friend const FPoint operator + (const FPoint&, const FPoint&);
|
||||
friend const FPoint operator - (const FPoint&, const FPoint&);
|
||||
friend const FPoint operator - (const FPoint&);
|
||||
friend FPoint operator + (const FPoint&, const FPoint&);
|
||||
friend FPoint operator - (const FPoint&, const FPoint&);
|
||||
friend FPoint operator - (const FPoint&);
|
||||
friend std::ostream& operator << (std::ostream&, const FPoint&);
|
||||
friend std::istream& operator >> (std::istream&, FPoint&);
|
||||
};
|
||||
|
@ -121,7 +121,7 @@ inline FPoint::FPoint (int x, int y)
|
|||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FPoint::getClassName()
|
||||
inline FString FPoint::getClassName()
|
||||
{ return "FPoint"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -155,15 +155,15 @@ inline bool operator != (const FPoint& p1, const FPoint& p2)
|
|||
{ return p1.xpos != p2.xpos || p1.ypos != p2.ypos; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FPoint operator + (const FPoint& p1, const FPoint& p2)
|
||||
inline FPoint operator + (const FPoint& p1, const FPoint& p2)
|
||||
{ return {p1.xpos + p2.xpos, p1.ypos + p2.ypos}; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FPoint operator - (const FPoint& p1, const FPoint& p2)
|
||||
inline FPoint operator - (const FPoint& p1, const FPoint& p2)
|
||||
{ return {p1.xpos - p2.xpos, p1.ypos - p2.ypos}; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FPoint operator - (const FPoint& p)
|
||||
inline FPoint operator - (const FPoint& p)
|
||||
{ return {-p.xpos, -p.ypos}; }
|
||||
|
||||
} // namespace finalcut
|
||||
|
|
|
@ -69,7 +69,7 @@ class FProgressbar : public FWidget
|
|||
~FProgressbar() override;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
std::size_t getPercentage() const;
|
||||
|
||||
// Mutators
|
||||
|
@ -90,7 +90,7 @@ class FProgressbar : public FWidget
|
|||
|
||||
private:
|
||||
// Constants
|
||||
static constexpr std::size_t NOT_SET = static_cast<std::size_t>(-1);
|
||||
static constexpr auto NOT_SET = static_cast<std::size_t>(-1);
|
||||
|
||||
// Methods
|
||||
void init();
|
||||
|
@ -108,7 +108,7 @@ class FProgressbar : public FWidget
|
|||
|
||||
// FProgressbar inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FProgressbar::getClassName() const
|
||||
inline FString FProgressbar::getClassName() const
|
||||
{ return "FProgressbar"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -78,7 +78,7 @@ class FRadioButton : public FToggleButton
|
|||
FRadioButton& operator = (const FRadioButton&) = delete;
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
private:
|
||||
// Methods
|
||||
|
@ -92,7 +92,7 @@ class FRadioButton : public FToggleButton
|
|||
|
||||
// FRadioButton inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FRadioButton::getClassName() const
|
||||
inline FString FRadioButton::getClassName() const
|
||||
{ return "FRadioButton"; }
|
||||
|
||||
} // namespace finalcut
|
||||
|
|
|
@ -78,7 +78,7 @@ class FRadioMenuItem : public FMenuItem
|
|||
FRadioMenuItem& operator = (const FRadioMenuItem&) = delete;
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
private:
|
||||
// Methods
|
||||
|
@ -89,7 +89,7 @@ class FRadioMenuItem : public FMenuItem
|
|||
|
||||
// FRadioMenuItem inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FRadioMenuItem::getClassName() const
|
||||
inline FString FRadioMenuItem::getClassName() const
|
||||
{ return "FRadioMenuItem"; }
|
||||
|
||||
} // namespace finalcut
|
||||
|
|
|
@ -74,21 +74,21 @@ class FRect
|
|||
FRect& operator = (FRect&&) noexcept;
|
||||
|
||||
// Accessors
|
||||
virtual const FString getClassName();
|
||||
virtual FString getClassName();
|
||||
int getX1() const;
|
||||
int getY1() const;
|
||||
int getX2() const;
|
||||
int getY2() const;
|
||||
int getX() const;
|
||||
int getY() const;
|
||||
const FPoint getPos() const;
|
||||
const FPoint getUpperLeftPos() const;
|
||||
const FPoint getUpperRightPos() const;
|
||||
const FPoint getLowerLeftPos() const;
|
||||
const FPoint getLowerRightPos() const;
|
||||
FPoint getPos() const;
|
||||
FPoint getUpperLeftPos() const;
|
||||
FPoint getUpperRightPos() const;
|
||||
FPoint getLowerLeftPos() const;
|
||||
FPoint getLowerRightPos() const;
|
||||
std::size_t getWidth() const;
|
||||
std::size_t getHeight() const;
|
||||
const FSize getSize() const;
|
||||
FSize getSize() const;
|
||||
|
||||
// Mutators
|
||||
void setX1 (int);
|
||||
|
@ -138,8 +138,8 @@ class FRect
|
|||
int Y2{-1};
|
||||
|
||||
// Friend operator functions
|
||||
friend const FRect operator + (const FRect&, const FSize&);
|
||||
friend const FRect operator - (const FRect&, const FSize&);
|
||||
friend FRect operator + (const FRect&, const FSize&);
|
||||
friend FRect operator - (const FRect&, const FSize&);
|
||||
friend bool operator == (const FRect&, const FRect&);
|
||||
friend bool operator != (const FRect&, const FRect&);
|
||||
friend std::ostream& operator << (std::ostream&, const FRect&);
|
||||
|
@ -172,7 +172,7 @@ inline FRect::FRect (int x, int y, std::size_t width, std::size_t height)
|
|||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FRect::getClassName()
|
||||
inline FString FRect::getClassName()
|
||||
{ return "FRect"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -100,7 +100,7 @@ class FScrollbar : public FWidget
|
|||
FScrollbar& operator = (const FScrollbar&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
int getValue() const;
|
||||
sType getScrollType() const;
|
||||
|
||||
|
@ -203,7 +203,7 @@ void initScrollbar ( FScrollbarPtr& bar
|
|||
|
||||
// FScrollbar inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FScrollbar::getClassName() const
|
||||
inline FString FScrollbar::getClassName() const
|
||||
{ return "FScrollbar"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -80,14 +80,14 @@ class FScrollView : public FWidget
|
|||
FScrollView& operator = (const FScrollView&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
std::size_t getViewportWidth() const;
|
||||
std::size_t getViewportHeight() const;
|
||||
const FSize getViewportSize() const;
|
||||
FSize getViewportSize() const;
|
||||
std::size_t getScrollWidth() const;
|
||||
std::size_t getScrollHeight() const;
|
||||
const FSize getScrollSize() const;
|
||||
const FPoint getScrollPos() const;
|
||||
FSize getScrollSize() const;
|
||||
FPoint getScrollPos() const;
|
||||
int getScrollX() const;
|
||||
int getScrollY() const;
|
||||
|
||||
|
@ -191,7 +191,7 @@ class FScrollView : public FWidget
|
|||
|
||||
// FScrollView inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FScrollView::getClassName() const
|
||||
inline FString FScrollView::getClassName() const
|
||||
{ return "FScrollView"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -203,7 +203,7 @@ inline std::size_t FScrollView::getViewportHeight() const
|
|||
{ return getHeight() - horizontal_border_spacing; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FSize FScrollView::getViewportSize() const
|
||||
inline FSize FScrollView::getViewportSize() const
|
||||
{ return FSize(getViewportWidth(), getViewportHeight()); }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -215,11 +215,11 @@ inline std::size_t FScrollView::getScrollHeight() const
|
|||
{ return scroll_geometry.getHeight(); }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FSize FScrollView::getScrollSize() const
|
||||
inline FSize FScrollView::getScrollSize() const
|
||||
{ return scroll_geometry.getSize(); }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FPoint FScrollView::getScrollPos() const
|
||||
inline FPoint FScrollView::getScrollPos() const
|
||||
{ return viewport_geometry.getPos(); }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -71,7 +71,7 @@ class FSize
|
|||
FSize& operator -= (const FSize&);
|
||||
|
||||
// Accessors
|
||||
virtual const FString getClassName();
|
||||
virtual FString getClassName();
|
||||
std::size_t getWidth() const;
|
||||
std::size_t getHeight() const;
|
||||
std::size_t getArea() const;
|
||||
|
@ -103,8 +103,8 @@ class FSize
|
|||
friend bool operator != (const FSize&, const FSize&);
|
||||
friend bool operator >= (const FSize&, const FSize&);
|
||||
friend bool operator > (const FSize&, const FSize&);
|
||||
friend const FSize operator + (const FSize&, const FSize&);
|
||||
friend const FSize operator - (const FSize&, const FSize&);
|
||||
friend FSize operator + (const FSize&, const FSize&);
|
||||
friend FSize operator - (const FSize&, const FSize&);
|
||||
|
||||
friend std::ostream& operator << (std::ostream&, const FSize&);
|
||||
friend std::istream& operator >> (std::istream&, FSize&);
|
||||
|
@ -130,7 +130,7 @@ inline FSize::FSize (std::size_t w, std::size_t h)
|
|||
{ }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FSize::getClassName()
|
||||
inline FString FSize::getClassName()
|
||||
{ return "FSize"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -180,7 +180,7 @@ inline bool operator > (const FSize& s1, const FSize& s2)
|
|||
{ return s1.width > s2.width && s1.height > s2.height; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FSize operator + (const FSize& s1, const FSize& s2)
|
||||
inline FSize operator + (const FSize& s1, const FSize& s2)
|
||||
{
|
||||
constexpr std::size_t max = std::numeric_limits<std::size_t>::max();
|
||||
const std::size_t w = ( s1.width < max - s2.width) ? s1.width + s2.width : max;
|
||||
|
@ -189,7 +189,7 @@ inline const FSize operator + (const FSize& s1, const FSize& s2)
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FSize operator - (const FSize& s1, const FSize& s2)
|
||||
inline FSize operator - (const FSize& s1, const FSize& s2)
|
||||
{
|
||||
const std::size_t w = ( s1.width >= s2.width ) ? s1.width - s2.width : 0;
|
||||
const std::size_t h = ( s1.height >= s2.height ) ? s1.height - s2.height : 0;
|
||||
|
|
|
@ -80,7 +80,7 @@ class FSpinBox : public FWidget
|
|||
FSpinBox& operator = (const FSpinBox&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
sInt64 getValue() const;
|
||||
FString getPrefix() const;
|
||||
FString getSuffix() const;
|
||||
|
@ -161,7 +161,7 @@ class FSpinBox : public FWidget
|
|||
|
||||
// FSpinBox inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FSpinBox::getClassName() const
|
||||
inline FString FSpinBox::getClassName() const
|
||||
{ return "FSpinBox"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -65,7 +65,7 @@ class FStartOptions final
|
|||
FStartOptions& operator = (const FStartOptions&) = delete;
|
||||
|
||||
// Accessors
|
||||
static const FString getClassName();
|
||||
static FString getClassName();
|
||||
static FStartOptions& getFStartOptions();
|
||||
|
||||
// Mutator
|
||||
|
@ -102,7 +102,7 @@ class FStartOptions final
|
|||
};
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FStartOptions::getClassName()
|
||||
inline FString FStartOptions::getClassName()
|
||||
{ return "FStartOptions"; }
|
||||
|
||||
} // namespace finalcut
|
||||
|
|
|
@ -87,7 +87,7 @@ class FStatusKey : public FWidget
|
|||
FStatusKey& operator = (const FStatusKey&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
virtual FKey getKey() const;
|
||||
virtual FString getText() const;
|
||||
|
||||
|
@ -128,7 +128,7 @@ class FStatusKey : public FWidget
|
|||
|
||||
// FStatusKey inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FStatusKey::getClassName() const
|
||||
inline FString FStatusKey::getClassName() const
|
||||
{ return "FStatusKey"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -196,7 +196,7 @@ class FStatusBar : public FWindow
|
|||
FStatusBar& operator = (const FStatusBar&) = delete;
|
||||
|
||||
// Accessors
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
FStatusKey* getStatusKey (int) const;
|
||||
FString getMessage() const;
|
||||
std::size_t getCount() const;
|
||||
|
@ -255,7 +255,7 @@ class FStatusBar : public FWindow
|
|||
|
||||
// FStatusBar inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FStatusBar::getClassName() const
|
||||
inline FString FStatusBar::getClassName() const
|
||||
{ return "FStatusBar"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -159,7 +159,7 @@ class FString
|
|||
operator const char* () const { return c_str(); }
|
||||
|
||||
// Accessor
|
||||
virtual const FString getClassName() const;
|
||||
virtual FString getClassName() const;
|
||||
|
||||
// inquiries
|
||||
bool isNull() const;
|
||||
|
@ -185,10 +185,10 @@ class FString
|
|||
wchar_t* wc_str();
|
||||
const char* c_str() const;
|
||||
char* c_str();
|
||||
const std::string toString() const;
|
||||
std::string toString() const;
|
||||
|
||||
const FString toLower() const;
|
||||
const FString toUpper() const;
|
||||
FString toLower() const;
|
||||
FString toUpper() const;
|
||||
|
||||
sInt16 toShort() const;
|
||||
uInt16 toUShort() const;
|
||||
|
@ -199,13 +199,13 @@ class FString
|
|||
float toFloat() const;
|
||||
double toDouble() const;
|
||||
|
||||
const FString ltrim() const;
|
||||
const FString rtrim() const;
|
||||
const FString trim() const;
|
||||
FString ltrim() const;
|
||||
FString rtrim() const;
|
||||
FString trim() const;
|
||||
|
||||
const FString left (std::size_t) const;
|
||||
const FString right (std::size_t) const;
|
||||
const FString mid (std::size_t, std::size_t) const;
|
||||
FString left (std::size_t) const;
|
||||
FString right (std::size_t) const;
|
||||
FString mid (std::size_t, std::size_t) const;
|
||||
|
||||
FStringList split (const FString&) const;
|
||||
FString& setString (const FString&);
|
||||
|
@ -224,10 +224,10 @@ class FString
|
|||
const FString& insert (const FString&, int);
|
||||
const FString& insert (const FString&, std::size_t);
|
||||
|
||||
const FString replace (const FString&, const FString&) const;
|
||||
FString replace (const FString&, const FString&) const;
|
||||
|
||||
const FString replaceControlCodes() const;
|
||||
const FString expandTabs (int = 8) const;
|
||||
FString replaceControlCodes() const;
|
||||
FString expandTabs (int = 8) const;
|
||||
FString removeDel() const;
|
||||
FString removeBackspaces() const;
|
||||
|
||||
|
@ -261,15 +261,15 @@ class FString
|
|||
static const wchar_t const_null_char;
|
||||
|
||||
// Friend Non-member operator functions
|
||||
friend const FString operator + (const FString&, const FString&);
|
||||
friend const FString operator + (const FString&, const wchar_t);
|
||||
friend const FString operator + (const std::wstring&, const FString&);
|
||||
friend const FString operator + (const wchar_t[], const FString&);
|
||||
friend const FString operator + (const std::string&, const FString&);
|
||||
friend const FString operator + (const char[], const FString&);
|
||||
friend const FString operator + (const wchar_t, const FString&);
|
||||
friend const FString operator + (const char, const FString&);
|
||||
friend const FString operator + (const FString&, const char);
|
||||
friend FString operator + (const FString&, const FString&);
|
||||
friend FString operator + (const FString&, const wchar_t);
|
||||
friend FString operator + (const std::wstring&, const FString&);
|
||||
friend FString operator + (const wchar_t[], const FString&);
|
||||
friend FString operator + (const std::string&, const FString&);
|
||||
friend FString operator + (const char[], const FString&);
|
||||
friend FString operator + (const wchar_t, const FString&);
|
||||
friend FString operator + (const char, const FString&);
|
||||
friend FString operator + (const FString&, const char);
|
||||
|
||||
friend std::ostream& operator << (std::ostream&, const FString&);
|
||||
friend std::istream& operator >> (std::istream&, FString& s);
|
||||
|
@ -366,7 +366,7 @@ inline bool FString::operator > (const CharT& s) const
|
|||
}
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FString::getClassName() const
|
||||
inline FString FString::getClassName() const
|
||||
{ return "FString"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -80,7 +80,7 @@ class FStringStream : public std::wiostream
|
|||
// Move assignment operator (=)
|
||||
FStringStream& operator = (FStringStream&& sstream) noexcept;
|
||||
|
||||
virtual const FString getClassName() const;
|
||||
virtual FString getClassName() const;
|
||||
void swap (FStringStream&) noexcept;
|
||||
void clear();
|
||||
std::wstringbuf* rdbuf() const;
|
||||
|
@ -93,7 +93,7 @@ class FStringStream : public std::wiostream
|
|||
|
||||
// FStringStream inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FStringStream::getClassName() const
|
||||
inline FString FStringStream::getClassName() const
|
||||
{ return "FStringStream"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
|
|
@ -70,7 +70,7 @@ class FStyle
|
|||
}
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const
|
||||
FString getClassName() const
|
||||
{ return "FStyle"; }
|
||||
|
||||
FColor getStyle() const
|
||||
|
|
|
@ -78,7 +78,7 @@ class FSwitch : public FToggleButton
|
|||
FSwitch& operator = (const FSwitch&) = delete;
|
||||
|
||||
// Accessor
|
||||
const FString getClassName() const override;
|
||||
FString getClassName() const override;
|
||||
|
||||
// Mutator
|
||||
void setText (const FString&) override;
|
||||
|
@ -102,7 +102,7 @@ class FSwitch : public FToggleButton
|
|||
|
||||
// FSwitch inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FSwitch::getClassName() const
|
||||
inline FString FSwitch::getClassName() const
|
||||
{ return "FSwitch"; }
|
||||
|
||||
} // namespace finalcut
|
||||
|
|
|
@ -178,10 +178,10 @@ class FTerm final
|
|||
FTerm& operator = (const FTerm&) = delete;
|
||||
|
||||
// Accessors
|
||||
static const FString getClassName();
|
||||
static FString getClassName();
|
||||
static std::size_t getLineNumber();
|
||||
static std::size_t getColumnNumber();
|
||||
static const FString getKeyName (FKey);
|
||||
static FString getKeyName (FKey);
|
||||
static int getTTYFileDescriptor();
|
||||
static const char* getTermType();
|
||||
static const char* getTermFileName();
|
||||
|
@ -406,9 +406,9 @@ bool isReverseNewFontchar (wchar_t);
|
|||
bool hasFullWidthSupports();
|
||||
wchar_t cp437_to_unicode (uChar);
|
||||
uChar unicode_to_cp437 (wchar_t);
|
||||
const FString getFullWidth (const FString&);
|
||||
const FString getHalfWidth (const FString&);
|
||||
const FString getColumnSubString (const FString&, std::size_t, std::size_t);
|
||||
FString getFullWidth (const FString&);
|
||||
FString getHalfWidth (const FString&);
|
||||
FString getColumnSubString (const FString&, std::size_t, std::size_t);
|
||||
std::size_t getLengthFromColumnWidth (const FString&, std::size_t);
|
||||
std::size_t getColumnWidth (const FString&, std::size_t);
|
||||
std::size_t getColumnWidth (const FString&);
|
||||
|
@ -419,7 +419,7 @@ std::size_t getColumnWidth (const FTermBuffer&);
|
|||
|
||||
// FTerm inline functions
|
||||
//----------------------------------------------------------------------
|
||||
inline const FString FTerm::getClassName()
|
||||
inline FString FTerm::getClassName()
|
||||
{ return "FTerm"; }
|
||||
|
||||
//----------------------------------------------------------------------
|
||||
|
@ -462,7 +462,7 @@ inline void FTerm::putstringf (const char format[], Args&&... args)
|
|||
if ( ! fsys )
|
||||
getFSystem(); // Trying to set fsys
|
||||
|
||||
const std::size_t count = std::size_t(size);
|
||||
const auto count = std::size_t(size);
|
||||
std::vector<char> buf(count);
|
||||
std::snprintf (&buf[0], count, format, std::forward<Args>(args)...);
|
||||
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue