You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- Added a "shield" indicating the required MATLAB versions.
- Reordered methods lexicographically.
- Added link for `aboutDojo`.
- Added explanation and usage example for `getHTML` and `getWidgetInfo`.
- `fontWeight`- Clarified when this method has an effect; mentioned that `'lighter'` is also accepted.
- Removed some of the internal documentation in `mlapptools.m`.
`mlapptools` is an example set of static MATLAB methods for manipulating the DOM underlying the App Designer UI elements formally introduced in R2016a.
4
+
`mlapptools` is a collection of static methods for customizing the R2016a-introduced web-based `uifigure` windows and
5
+
associated UI elements through DOM manipulations.
6
+
7
+
For additional information, see Iliya Romm's Undocumented Matlab guest article,
8
+
[*Customizing uifigures part 2*](http://undocumentedmatlab.com/blog/customizing-uifigures-part-2),
9
+
published Wednesday, September 7th, 2016.
10
+
11
+
#### Contact us
12
+
- Feature requests/suggestions and bug repots - please feel free to
13
+
[open an issue](https://github.com/StackOverflowMATLABchat/mlapptools/issues) in the repository.
14
+
- General discussion - [_MATLAB and Octave_ chatroom on Stack Overflow](https://chat.stackoverflow.com/rooms/81987/).
15
+
- Specific questions about manipulating uifigures / App Designer apps -
16
+
[`matlab-app-designer` tag on Stack Overflow](https://stackoverflow.com/questions/tagged/matlab-app-designer).
17
+
18
+
## Methods
19
+
[`aboutDojo`](#aboutDojo) - Return the Dojo toolkit version.
20
+
[`fontColor`](#fontColor) - Modify font color.
21
+
[`fontWeight`](#fontWeight) - Modify font weight.
22
+
[`getHTML`](#getHTML) - Return the full HTML code of a `uifigure`.
23
+
[`getWidgetInfo`](#getWidgetInfo) - Get a list of widgets from the dijit registry.
24
+
[`setStyle`](#setStyle) - Modify a specified style property.
25
+
[`textAlign`](#textAlign) - Modify text alignment.
26
+
27
+
<aname="aboutDojo"></a>
28
+
#### *mlapptools*.**aboutDojo**()
29
+
##### Description
30
+
Returns a `struct` containing version information about the Dojo toolkit loaded into the first open `uifigure`.
31
+
If no `uifigure` is open, a temporary window is created, queried, then closed - indicating the default Dojo version.
3
32
4
-
For additional information, see Iliya Romm's Undocumented Matlab guest article, [*Customizing uifigures part 2*](http://undocumentedmatlab.com/blog/customizing-uifigures-part-2), published Wednesday, September 7th, 2016.
33
+
##### Examples
5
34
6
-
## Methods
7
-
[`textAlign`](#textAlign) - Modify text alignment
8
-
[`fontWeight`](#fontWeight) - Modify font weight
9
-
[`fontColor`](#fontColor) - Modify font folor
10
-
[`setStyle`](#setStyle) - Modify a specified style property
11
-
`aboutDojo` - Return version information about the Dojo toolkit.
Set the font weight of the specified UI element, `uielement`, to the input weight string or integer, `weight`.
82
+
For this setting to have an effect, the font being used must have built-in faces that match the specified weight.
42
83
43
84
Valid font weight property values are:
44
85
*`'normal'` - Normal characters (default)
45
86
*`'bold'` - Thick characters
46
-
*`'bolder'` - Thicker characters
47
-
*`[400, 600, 800]` - Integers mapping to `'normal'`, `'bold'`, and `'bolder'`. Intermediate integers (and floats) are accepted but generally map to these 3 values
87
+
*`'lighter'` / `'bolder'` - The closest available "lighter" or "bolder" weight, relative to the parent.
88
+
*`100 .. 900` - Integers mapping to `'normal'`, `'bold'`, etc.
89
+
Intermediate integers (and floats) are accepted but generally map to the available values
Set the font color of the specified UI element, `'uielement'`, to the input color, `newcolor`. `newcolor` can be a predefined color string or a string containing a valid CSS color method call.
67
105
68
-
Valid color specifications are:
69
-
* Hexadecimal colors - e.g. `'#ff0000'` for red
70
-
* RGB colors - e.g. `'rgb(255,165,0)'` for orange
71
-
* RGBA colors - e.g. `'rgba(255,255,0,0.3)'` for yellow
72
-
* HSL colors - e.g. `'hsl(120, 100%, 50%)'` for green
73
-
* HSLA colors - e.g. `'hsla(240,100%,50%, 1.0)'` for blue
74
-
* Predefined color names - e.g. `'red'`, `'orange'`, `'yellow'`, `'green'`, `'blue'`, `'indigo'`, `'violet'`. For more colors, see the predefined color names [CSS color specification](https://www.w3.org/TR/css3-color/).
106
+
<aname="getHTML"></a>
107
+
#### *mlapptools*.**getHTML**(*hUIFigure*)
108
+
##### Description
109
+
A method for obtaining the HTML code of a uifigure. Intended for R2017b (and onward?) where the CEF URL cannot be
110
+
simply opened in a browser.
75
111
76
112
##### Examples
77
113
Using the demo GUI generated by `./Demo/DOMdemoGUI.m`
Set the style attribute `styleAttr` of the specified UI element, `'uielement'`, to the value `styleValue`. `styleAttr` should be any valid CSS attribute, and `styleValue` a valid setting thereof.
135
+
Set the style attribute `styleAttr` of the specified UI element, `'uielement'`, to the value `styleValue`. `styleAttr`
136
+
should be any valid CSS attribute, and `styleValue` a valid setting thereof.
93
137
94
-
This method provides a general interface to change CSS style attributes, with minimal input testing and error reporting, so it is up to the user to provide valid inputs.
138
+
This method provides a general interface to change CSS style attributes, with minimal input testing and error reporting,
139
+
so it is up to the user to provide valid inputs.
95
140
96
141
Valid style attributes and corresponding settings can be found [here](https://www.w3schools.com/cssref/).
97
142
@@ -101,4 +146,30 @@ Using the demo GUI generated by `./Demo/DOMdemoGUI.m`
0 commit comments