Skip to content

Commit b768aed

Browse files
committedJun 14, 2020
update docs
·
v0.14.0v0.8.0
1 parent addadf8 commit b768aed

File tree

9 files changed

+3299
-0
lines changed

9 files changed

+3299
-0
lines changed
 

‎website/docs/api/classes/rnmenu.md

Lines changed: 1292 additions & 0 deletions
Large diffs are not rendered by default.

‎website/docs/api/classes/rnmenubar.md

Lines changed: 1296 additions & 0 deletions
Large diffs are not rendered by default.

‎website/docs/api/globals.md

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ sidebar_label: "Globals"
1414

1515
* [RNGridColumn](classes/rngridcolumn.md)
1616
* [RNGridRow](classes/rngridrow.md)
17+
* [RNMenu](classes/rnmenu.md)
18+
* [RNMenuBar](classes/rnmenubar.md)
1719
* [Renderer](classes/renderer.md)
1820

1921
### Interfaces
@@ -29,12 +31,15 @@ sidebar_label: "Globals"
2931
* [GridViewProps](interfaces/gridviewprops.md)
3032
* [ImageProps](interfaces/imageprops.md)
3133
* [LineEditProps](interfaces/lineeditprops.md)
34+
* [MenuBarProps](interfaces/menubarprops.md)
35+
* [MenuProps](interfaces/menuprops.md)
3236
* [PlainTextEditProps](interfaces/plaintexteditprops.md)
3337
* [ProgressBarProps](interfaces/progressbarprops.md)
3438
* [RadioButtonProps](interfaces/radiobuttonprops.md)
3539
* [ScrollAreaProps](interfaces/scrollareaprops.md)
3640
* [SliderProps](interfaces/sliderprops.md)
3741
* [SpinBoxProps](interfaces/spinboxprops.md)
42+
* [SystemTrayIconProps](interfaces/systemtrayiconprops.md)
3843
* [TabItemProps](interfaces/tabitemprops.md)
3944
* [TabProps](interfaces/tabprops.md)
4045
* [TextProps](interfaces/textprops.md)
@@ -66,6 +71,13 @@ sidebar_label: "Globals"
6671
### Variables
6772

6873
* [appProxy](globals.md#let-appproxy)
74+
* [fileActions](globals.md#const-fileactions)
75+
* [quitAction](globals.md#const-quitaction)
76+
* [randActions](globals.md#const-randactions)
77+
* [sayHi](globals.md#const-sayhi)
78+
* [separatorAction](globals.md#const-separatoraction)
79+
* [systemTrayMenuActions](globals.md#const-systemtraymenuactions)
80+
* [trayIcon](globals.md#const-trayicon)
6981

7082
### Functions
7183

@@ -86,12 +98,15 @@ sidebar_label: "Globals"
8698
* [setGridViewProps](globals.md#const-setgridviewprops)
8799
* [setImageProps](globals.md#const-setimageprops)
88100
* [setLineEditProps](globals.md#const-setlineeditprops)
101+
* [setMenuBarProps](globals.md#const-setmenubarprops)
102+
* [setMenuProps](globals.md#const-setmenuprops)
89103
* [setPlainTextEditProps](globals.md#const-setplaintexteditprops)
90104
* [setProgressBarProps](globals.md#const-setprogressbarprops)
91105
* [setRadioButtonProps](globals.md#const-setradiobuttonprops)
92106
* [setScrollAreaProps](globals.md#const-setscrollareaprops)
93107
* [setSliderProps](globals.md#const-setsliderprops)
94108
* [setSpinBoxProps](globals.md#const-setspinboxprops)
109+
* [setSystemTrayIconProps](globals.md#const-setsystemtrayiconprops)
95110
* [setWindowProps](globals.md#const-setwindowprops)
96111
* [updateDisplacedChildren](globals.md#updatedisplacedchildren)
97112
* [useEventHandler](globals.md#useeventhandler)
@@ -315,6 +330,50 @@ ___
315330

316331
**appProxy**: *[ReactProxyComponent](interfaces/_react_proxy_.reactproxycomponent.md)*
317332

333+
___
334+
335+
### `Const` fileActions
336+
337+
**fileActions**: *QAction[]* = [quitAction]
338+
339+
___
340+
341+
### `Const` quitAction
342+
343+
**quitAction**: *QAction‹›* = new QAction()
344+
345+
___
346+
347+
### `Const` randActions
348+
349+
**randActions**: *QAction[]* = [sayHi]
350+
351+
___
352+
353+
### `Const` sayHi
354+
355+
**sayHi**: *QAction‹›* = new QAction()
356+
357+
___
358+
359+
### `Const` separatorAction
360+
361+
**separatorAction**: *QAction‹›* = new QAction()
362+
363+
___
364+
365+
### `Const` systemTrayMenuActions
366+
367+
**systemTrayMenuActions**: *QAction‹›[]* = [sayHi, separatorAction, quitAction]
368+
369+
___
370+
371+
### `Const` trayIcon
372+
373+
**trayIcon**: *QIcon‹›* = new QIcon(
374+
path.join(__dirname, "../extras/assets/nodegui.png")
375+
)
376+
318377
## Functions
319378

320379
### `Const` App
@@ -585,6 +644,38 @@ Name | Type |
585644

586645
___
587646

647+
### `Const` setMenuBarProps
648+
649+
**setMenuBarProps**(`widget`: [RNMenuBar](classes/rnmenubar.md), `newProps`: [MenuBarProps](interfaces/menubarprops.md), `oldProps`: [MenuBarProps](interfaces/menubarprops.md)): *void*
650+
651+
**Parameters:**
652+
653+
Name | Type |
654+
------ | ------ |
655+
`widget` | [RNMenuBar](classes/rnmenubar.md) |
656+
`newProps` | [MenuBarProps](interfaces/menubarprops.md) |
657+
`oldProps` | [MenuBarProps](interfaces/menubarprops.md) |
658+
659+
**Returns:** *void*
660+
661+
___
662+
663+
### `Const` setMenuProps
664+
665+
**setMenuProps**(`widget`: [RNMenu](classes/rnmenu.md), `newProps`: [MenuProps](interfaces/menuprops.md), `oldProps`: [MenuProps](interfaces/menuprops.md)): *void*
666+
667+
**Parameters:**
668+
669+
Name | Type |
670+
------ | ------ |
671+
`widget` | [RNMenu](classes/rnmenu.md) |
672+
`newProps` | [MenuProps](interfaces/menuprops.md) |
673+
`oldProps` | [MenuProps](interfaces/menuprops.md) |
674+
675+
**Returns:** *void*
676+
677+
___
678+
588679
### `Const` setPlainTextEditProps
589680

590681
**setPlainTextEditProps**(`widget`: RNPlainTextEdit, `newProps`: [PlainTextEditProps](interfaces/plaintexteditprops.md), `oldProps`: [PlainTextEditProps](interfaces/plaintexteditprops.md)): *void*
@@ -681,6 +772,22 @@ Name | Type |
681772

682773
___
683774

775+
### `Const` setSystemTrayIconProps
776+
777+
**setSystemTrayIconProps**(`widget`: RNSystemTrayIcon, `newProps`: [SystemTrayIconProps](interfaces/systemtrayiconprops.md), `oldProps`: [SystemTrayIconProps](interfaces/systemtrayiconprops.md)): *void*
778+
779+
**Parameters:**
780+
781+
Name | Type |
782+
------ | ------ |
783+
`widget` | RNSystemTrayIcon |
784+
`newProps` | [SystemTrayIconProps](interfaces/systemtrayiconprops.md) |
785+
`oldProps` | [SystemTrayIconProps](interfaces/systemtrayiconprops.md) |
786+
787+
**Returns:** *void*
788+
789+
___
790+
684791
### `Const` setWindowProps
685792

686793
**setWindowProps**(`window`: RNWindow, `newProps`: [WindowProps](interfaces/windowprops.md), `oldProps`: [WindowProps](interfaces/windowprops.md)): *void*
Lines changed: 245 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,245 @@
1+
---
2+
id: "menubarprops"
3+
title: "MenuBarProps"
4+
sidebar_label: "MenuBarProps"
5+
---
6+
7+
## Hierarchy
8+
9+
[ViewProps](viewprops.md)‹QMenuBarSignals›
10+
11+
**MenuBarProps**
12+
13+
## Index
14+
15+
### Properties
16+
17+
* [attributes](menubarprops.md#optional-attributes)
18+
* [cursor](menubarprops.md#optional-cursor)
19+
* [enabled](menubarprops.md#optional-enabled)
20+
* [geometry](menubarprops.md#optional-geometry)
21+
* [id](menubarprops.md#optional-id)
22+
* [maxSize](menubarprops.md#optional-maxsize)
23+
* [minSize](menubarprops.md#optional-minsize)
24+
* [mouseTracking](menubarprops.md#optional-mousetracking)
25+
* [nativeMenuBar](menubarprops.md#optional-nativemenubar)
26+
* [on](menubarprops.md#optional-on)
27+
* [pos](menubarprops.md#optional-pos)
28+
* [ref](menubarprops.md#optional-ref)
29+
* [size](menubarprops.md#optional-size)
30+
* [style](menubarprops.md#optional-style)
31+
* [styleSheet](menubarprops.md#optional-stylesheet)
32+
* [visible](menubarprops.md#optional-visible)
33+
* [windowFlags](menubarprops.md#optional-windowflags)
34+
* [windowIcon](menubarprops.md#optional-windowicon)
35+
* [windowOpacity](menubarprops.md#optional-windowopacity)
36+
* [windowState](menubarprops.md#optional-windowstate)
37+
* [windowTitle](menubarprops.md#optional-windowtitle)
38+
39+
## Properties
40+
41+
### `Optional` attributes
42+
43+
**attributes**? : *[WidgetAttributesMap](../globals.md#widgetattributesmap)*
44+
45+
*Inherited from [ViewProps](viewprops.md).[attributes](viewprops.md#optional-attributes)*
46+
47+
Prop to set the Widget Attributes. example:
48+
`<View attributes={{[WidgetAttributes.WA_Disabled]: true}} />`
49+
50+
___
51+
52+
### `Optional` cursor
53+
54+
**cursor**? : *CursorShape | QCursor*
55+
56+
*Inherited from [ViewProps](viewprops.md).[cursor](viewprops.md#optional-cursor)*
57+
58+
Sets the window mouse cursor. [QWidget: setCursor](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetcursorcursor)
59+
60+
___
61+
62+
### `Optional` enabled
63+
64+
**enabled**? : *undefined | false | true*
65+
66+
*Inherited from [ViewProps](viewprops.md).[enabled](viewprops.md#optional-enabled)*
67+
68+
Sets the property that tells whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. [QWidget: setEnabled](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetenabledenabled)
69+
70+
___
71+
72+
### `Optional` geometry
73+
74+
**geometry**? : *[Geometry](../globals.md#geometry)*
75+
76+
*Inherited from [ViewProps](viewprops.md).[geometry](viewprops.md#optional-geometry)*
77+
78+
Sets the screen position as well as size of the widget. [QWidget: setGeometry](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetgeometryx-y-width-height)
79+
80+
___
81+
82+
### `Optional` id
83+
84+
**id**? : *undefined | string*
85+
86+
*Inherited from [ViewProps](viewprops.md).[id](viewprops.md#optional-id)*
87+
88+
Sets the object name (id) of the widget in Qt. Object name can be analogous to id of an element in the web world. Using the objectName of the widget one can reference it in the Qt's stylesheet much like what we do with id in the web world. [QWidget: setObjectName](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetobjectnameobjectname)
89+
90+
___
91+
92+
### `Optional` maxSize
93+
94+
**maxSize**? : *[Size](../globals.md#size)*
95+
96+
*Inherited from [ViewProps](viewprops.md).[maxSize](viewprops.md#optional-maxsize)*
97+
98+
Sets the maximum size of the widget. [QWidget: setMaximumSize](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetmaximumsizewidth-height)
99+
100+
___
101+
102+
### `Optional` minSize
103+
104+
**minSize**? : *[Size](../globals.md#size)*
105+
106+
*Inherited from [ViewProps](viewprops.md).[minSize](viewprops.md#optional-minsize)*
107+
108+
Sets the minimum size of the widget. [QWidget: setMinimumSize](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetminimumsizewidth-height)
109+
110+
___
111+
112+
### `Optional` mouseTracking
113+
114+
**mouseTracking**? : *undefined | false | true*
115+
116+
*Inherited from [ViewProps](viewprops.md).[mouseTracking](viewprops.md#optional-mousetracking)*
117+
118+
Sets the property that tells whether mouseTracking is enabled for the widget. [QWidget: setMouseTracking](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetmousetrackingismousetracked)
119+
120+
___
121+
122+
### `Optional` nativeMenuBar
123+
124+
**nativeMenuBar**? : *undefined | false | true*
125+
126+
___
127+
128+
### `Optional` on
129+
130+
**on**? : *Partial‹[WidgetEventListeners](../globals.md#widgeteventlisteners) | QMenuBarSignals›*
131+
132+
*Inherited from [ViewProps](viewprops.md).[on](viewprops.md#optional-on)*
133+
134+
Prop to set the event listener map. See [Handlong Events](/docs/guides/handle-events)
135+
136+
___
137+
138+
### `Optional` pos
139+
140+
**pos**? : *[Position](../globals.md#position)*
141+
142+
*Inherited from [ViewProps](viewprops.md).[pos](viewprops.md#optional-pos)*
143+
144+
Sets the screen position of the widget. [QWidget: move](https://docs.nodegui.org/docs/api/NodeWidget#widgetmovex-y)
145+
146+
___
147+
148+
### `Optional` ref
149+
150+
**ref**? : *any*
151+
152+
*Inherited from [ViewProps](viewprops.md).[ref](viewprops.md#optional-ref)*
153+
154+
Prop to set the ref. The ref will return the underlying nodegui widget.
155+
156+
___
157+
158+
### `Optional` size
159+
160+
**size**? : *[ViewSize](../globals.md#viewsize)*
161+
162+
*Inherited from [ViewProps](viewprops.md).[size](viewprops.md#optional-size)*
163+
164+
Sets both the minimum and maximum sizes of the widget. [QWidget: setFixedSize](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetfixedsizewidth-height)
165+
166+
___
167+
168+
### `Optional` style
169+
170+
**style**? : *undefined | string*
171+
172+
*Inherited from [ViewProps](viewprops.md).[style](viewprops.md#optional-style)*
173+
174+
Sets the inline stylesheet property. [QWidget: setInlineStyle](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetinlinestylestyle)
175+
176+
___
177+
178+
### `Optional` styleSheet
179+
180+
**styleSheet**? : *undefined | string*
181+
182+
*Inherited from [ViewProps](viewprops.md).[styleSheet](viewprops.md#optional-stylesheet)*
183+
184+
Sets the property that holds the widget's style sheet. [QWidget: setStyleSheet](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetstylesheetstylesheet)
185+
186+
___
187+
188+
### `Optional` visible
189+
190+
**visible**? : *undefined | false | true*
191+
192+
*Inherited from [ViewProps](viewprops.md).[visible](viewprops.md#optional-visible)*
193+
194+
Shows or hides the widget and its children. [QWidget: show](https://docs.nodegui.org/docs/api/NodeWidget#widgetshow)
195+
196+
___
197+
198+
### `Optional` windowFlags
199+
200+
**windowFlags**? : *[WindowFlagsMap](../globals.md#windowflagsmap)*
201+
202+
*Inherited from [ViewProps](viewprops.md).[windowFlags](viewprops.md#optional-windowflags)*
203+
204+
Prop to set the Widget flags. example:
205+
`<View windowFlags={{[WindowType.SplashScreen]: true}} />`
206+
207+
___
208+
209+
### `Optional` windowIcon
210+
211+
**windowIcon**? : *QIcon*
212+
213+
*Inherited from [ViewProps](viewprops.md).[windowIcon](viewprops.md#optional-windowicon)*
214+
215+
Sets the window icon. [QWidget: setWindowIcon](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetwindowiconicon)
216+
217+
___
218+
219+
### `Optional` windowOpacity
220+
221+
**windowOpacity**? : *undefined | number*
222+
223+
*Inherited from [ViewProps](viewprops.md).[windowOpacity](viewprops.md#optional-windowopacity)*
224+
225+
This property holds the level of opacity for the window. [QWidget: setWindowOpacity](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetwindowopacityopacity)
226+
227+
___
228+
229+
### `Optional` windowState
230+
231+
**windowState**? : *WindowState*
232+
233+
*Inherited from [ViewProps](viewprops.md).[windowState](viewprops.md#optional-windowstate)*
234+
235+
Sets the window state. [QWidget: setWindowState](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetwindowstatestate)
236+
237+
___
238+
239+
### `Optional` windowTitle
240+
241+
**windowTitle**? : *undefined | string*
242+
243+
*Inherited from [ViewProps](viewprops.md).[windowTitle](viewprops.md#optional-windowtitle)*
244+
245+
Sets the window title property. [QWidget: setWindowTitle](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetwindowtitletitle)
Lines changed: 252 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,252 @@
1+
---
2+
id: "menuprops"
3+
title: "MenuProps"
4+
sidebar_label: "MenuProps"
5+
---
6+
7+
## Hierarchy
8+
9+
[ViewProps](viewprops.md)‹QMenuSignals›
10+
11+
**MenuProps**
12+
13+
## Index
14+
15+
### Properties
16+
17+
* [actions](menuprops.md#optional-actions)
18+
* [attributes](menuprops.md#optional-attributes)
19+
* [cursor](menuprops.md#optional-cursor)
20+
* [enabled](menuprops.md#optional-enabled)
21+
* [geometry](menuprops.md#optional-geometry)
22+
* [id](menuprops.md#optional-id)
23+
* [maxSize](menuprops.md#optional-maxsize)
24+
* [minSize](menuprops.md#optional-minsize)
25+
* [mouseTracking](menuprops.md#optional-mousetracking)
26+
* [on](menuprops.md#optional-on)
27+
* [pos](menuprops.md#optional-pos)
28+
* [ref](menuprops.md#optional-ref)
29+
* [size](menuprops.md#optional-size)
30+
* [style](menuprops.md#optional-style)
31+
* [styleSheet](menuprops.md#optional-stylesheet)
32+
* [title](menuprops.md#optional-title)
33+
* [visible](menuprops.md#optional-visible)
34+
* [windowFlags](menuprops.md#optional-windowflags)
35+
* [windowIcon](menuprops.md#optional-windowicon)
36+
* [windowOpacity](menuprops.md#optional-windowopacity)
37+
* [windowState](menuprops.md#optional-windowstate)
38+
* [windowTitle](menuprops.md#optional-windowtitle)
39+
40+
## Properties
41+
42+
### `Optional` actions
43+
44+
**actions**? : *QAction[]*
45+
46+
___
47+
48+
### `Optional` attributes
49+
50+
**attributes**? : *[WidgetAttributesMap](../globals.md#widgetattributesmap)*
51+
52+
*Inherited from [ViewProps](viewprops.md).[attributes](viewprops.md#optional-attributes)*
53+
54+
Prop to set the Widget Attributes. example:
55+
`<View attributes={{[WidgetAttributes.WA_Disabled]: true}} />`
56+
57+
___
58+
59+
### `Optional` cursor
60+
61+
**cursor**? : *CursorShape | QCursor*
62+
63+
*Inherited from [ViewProps](viewprops.md).[cursor](viewprops.md#optional-cursor)*
64+
65+
Sets the window mouse cursor. [QWidget: setCursor](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetcursorcursor)
66+
67+
___
68+
69+
### `Optional` enabled
70+
71+
**enabled**? : *undefined | false | true*
72+
73+
*Inherited from [ViewProps](viewprops.md).[enabled](viewprops.md#optional-enabled)*
74+
75+
Sets the property that tells whether the widget is enabled. In general an enabled widget handles keyboard and mouse events; a disabled widget does not. [QWidget: setEnabled](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetenabledenabled)
76+
77+
___
78+
79+
### `Optional` geometry
80+
81+
**geometry**? : *[Geometry](../globals.md#geometry)*
82+
83+
*Inherited from [ViewProps](viewprops.md).[geometry](viewprops.md#optional-geometry)*
84+
85+
Sets the screen position as well as size of the widget. [QWidget: setGeometry](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetgeometryx-y-width-height)
86+
87+
___
88+
89+
### `Optional` id
90+
91+
**id**? : *undefined | string*
92+
93+
*Inherited from [ViewProps](viewprops.md).[id](viewprops.md#optional-id)*
94+
95+
Sets the object name (id) of the widget in Qt. Object name can be analogous to id of an element in the web world. Using the objectName of the widget one can reference it in the Qt's stylesheet much like what we do with id in the web world. [QWidget: setObjectName](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetobjectnameobjectname)
96+
97+
___
98+
99+
### `Optional` maxSize
100+
101+
**maxSize**? : *[Size](../globals.md#size)*
102+
103+
*Inherited from [ViewProps](viewprops.md).[maxSize](viewprops.md#optional-maxsize)*
104+
105+
Sets the maximum size of the widget. [QWidget: setMaximumSize](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetmaximumsizewidth-height)
106+
107+
___
108+
109+
### `Optional` minSize
110+
111+
**minSize**? : *[Size](../globals.md#size)*
112+
113+
*Inherited from [ViewProps](viewprops.md).[minSize](viewprops.md#optional-minsize)*
114+
115+
Sets the minimum size of the widget. [QWidget: setMinimumSize](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetminimumsizewidth-height)
116+
117+
___
118+
119+
### `Optional` mouseTracking
120+
121+
**mouseTracking**? : *undefined | false | true*
122+
123+
*Inherited from [ViewProps](viewprops.md).[mouseTracking](viewprops.md#optional-mousetracking)*
124+
125+
Sets the property that tells whether mouseTracking is enabled for the widget. [QWidget: setMouseTracking](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetmousetrackingismousetracked)
126+
127+
___
128+
129+
### `Optional` on
130+
131+
**on**? : *Partial‹[WidgetEventListeners](../globals.md#widgeteventlisteners) | QMenuSignals›*
132+
133+
*Inherited from [ViewProps](viewprops.md).[on](viewprops.md#optional-on)*
134+
135+
Prop to set the event listener map. See [Handlong Events](/docs/guides/handle-events)
136+
137+
___
138+
139+
### `Optional` pos
140+
141+
**pos**? : *[Position](../globals.md#position)*
142+
143+
*Inherited from [ViewProps](viewprops.md).[pos](viewprops.md#optional-pos)*
144+
145+
Sets the screen position of the widget. [QWidget: move](https://docs.nodegui.org/docs/api/NodeWidget#widgetmovex-y)
146+
147+
___
148+
149+
### `Optional` ref
150+
151+
**ref**? : *any*
152+
153+
*Inherited from [ViewProps](viewprops.md).[ref](viewprops.md#optional-ref)*
154+
155+
Prop to set the ref. The ref will return the underlying nodegui widget.
156+
157+
___
158+
159+
### `Optional` size
160+
161+
**size**? : *[ViewSize](../globals.md#viewsize)*
162+
163+
*Inherited from [ViewProps](viewprops.md).[size](viewprops.md#optional-size)*
164+
165+
Sets both the minimum and maximum sizes of the widget. [QWidget: setFixedSize](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetfixedsizewidth-height)
166+
167+
___
168+
169+
### `Optional` style
170+
171+
**style**? : *undefined | string*
172+
173+
*Inherited from [ViewProps](viewprops.md).[style](viewprops.md#optional-style)*
174+
175+
Sets the inline stylesheet property. [QWidget: setInlineStyle](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetinlinestylestyle)
176+
177+
___
178+
179+
### `Optional` styleSheet
180+
181+
**styleSheet**? : *undefined | string*
182+
183+
*Inherited from [ViewProps](viewprops.md).[styleSheet](viewprops.md#optional-stylesheet)*
184+
185+
Sets the property that holds the widget's style sheet. [QWidget: setStyleSheet](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetstylesheetstylesheet)
186+
187+
___
188+
189+
### `Optional` title
190+
191+
**title**? : *undefined | string*
192+
193+
___
194+
195+
### `Optional` visible
196+
197+
**visible**? : *undefined | false | true*
198+
199+
*Inherited from [ViewProps](viewprops.md).[visible](viewprops.md#optional-visible)*
200+
201+
Shows or hides the widget and its children. [QWidget: show](https://docs.nodegui.org/docs/api/NodeWidget#widgetshow)
202+
203+
___
204+
205+
### `Optional` windowFlags
206+
207+
**windowFlags**? : *[WindowFlagsMap](../globals.md#windowflagsmap)*
208+
209+
*Inherited from [ViewProps](viewprops.md).[windowFlags](viewprops.md#optional-windowflags)*
210+
211+
Prop to set the Widget flags. example:
212+
`<View windowFlags={{[WindowType.SplashScreen]: true}} />`
213+
214+
___
215+
216+
### `Optional` windowIcon
217+
218+
**windowIcon**? : *QIcon*
219+
220+
*Inherited from [ViewProps](viewprops.md).[windowIcon](viewprops.md#optional-windowicon)*
221+
222+
Sets the window icon. [QWidget: setWindowIcon](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetwindowiconicon)
223+
224+
___
225+
226+
### `Optional` windowOpacity
227+
228+
**windowOpacity**? : *undefined | number*
229+
230+
*Inherited from [ViewProps](viewprops.md).[windowOpacity](viewprops.md#optional-windowopacity)*
231+
232+
This property holds the level of opacity for the window. [QWidget: setWindowOpacity](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetwindowopacityopacity)
233+
234+
___
235+
236+
### `Optional` windowState
237+
238+
**windowState**? : *WindowState*
239+
240+
*Inherited from [ViewProps](viewprops.md).[windowState](viewprops.md#optional-windowstate)*
241+
242+
Sets the window state. [QWidget: setWindowState](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetwindowstatestate)
243+
244+
___
245+
246+
### `Optional` windowTitle
247+
248+
**windowTitle**? : *undefined | string*
249+
250+
*Inherited from [ViewProps](viewprops.md).[windowTitle](viewprops.md#optional-windowtitle)*
251+
252+
Sets the window title property. [QWidget: setWindowTitle](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetwindowtitletitle)
Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
---
2+
id: "systemtrayiconprops"
3+
title: "SystemTrayIconProps"
4+
sidebar_label: "SystemTrayIconProps"
5+
---
6+
7+
The SystemTrayIcon component provides the ability to add and manipulate a native system tray icon.
8+
[NodeGui's QSystemTrayIcon](https://docs.nodegui.org/docs/api/generated/classes/qsystemtrayicon).
9+
## Example
10+
```javascript
11+
import React from "react";
12+
import { QIcon, QAction } from "@nodegui/nodegui";
13+
import { Menu, Renderer, SystemTrayIcon, Window } from "@nodegui/react-nodegui";
14+
import path from "path";
15+
16+
const icon = new QIcon(path.join(__dirname, "../extras/assets/nodegui.png"));
17+
const action = new QAction();
18+
action.setText("Hello");
19+
action.addEventListener("triggered", () => {
20+
console.log("hello");
21+
});
22+
23+
const App = () => {
24+
return (
25+
<Window>
26+
<SystemTrayIcon icon={icon} tooltip="Hello World" visible>
27+
<Menu actions={[action]} />
28+
</SystemTrayIcon>
29+
</Window>
30+
);
31+
};
32+
33+
Renderer.render(<App />);
34+
35+
```
36+
37+
## Hierarchy
38+
39+
* RNProps
40+
41+
**SystemTrayIconProps**
42+
43+
## Index
44+
45+
### Properties
46+
47+
* [icon](systemtrayiconprops.md#optional-icon)
48+
* [id](systemtrayiconprops.md#optional-id)
49+
* [on](systemtrayiconprops.md#optional-on)
50+
* [tooltip](systemtrayiconprops.md#optional-tooltip)
51+
* [visible](systemtrayiconprops.md#optional-visible)
52+
53+
## Properties
54+
55+
### `Optional` icon
56+
57+
**icon**? : *QIcon*
58+
59+
Sets an icon for the system tray. [QSystemTrayIcon: setIcon](https://docs.nodegui.org/docs/api/generated/classes/qsystemtrayicon#seticon)
60+
61+
___
62+
63+
### `Optional` id
64+
65+
**id**? : *undefined | string*
66+
67+
Sets the object name (id) of the widget in Qt. Object name can be analogous to id of an element in the web world. Using the objectName of the widget one can reference it in the Qt's stylesheet much like what we do with id in the web world. [QWidget: setObjectName](https://docs.nodegui.org/docs/api/NodeWidget#widgetsetobjectnameobjectname)
68+
69+
___
70+
71+
### `Optional` on
72+
73+
**on**? : *Partial‹[WidgetEventListeners](../globals.md#widgeteventlisteners) | QSystemTrayIconSignals›*
74+
75+
Prop to set the event listener map. See [Handlong Events](/docs/guides/handle-events)
76+
77+
___
78+
79+
### `Optional` tooltip
80+
81+
**tooltip**? : *undefined | string*
82+
83+
Sets a tooltip for the system tray. [QSystemTrayIcon: setTooltip](https://docs.nodegui.org/docs/api/generated/classes/qsystemtrayicon#settooltip)
84+
85+
___
86+
87+
### `Optional` visible
88+
89+
**visible**? : *undefined | false | true*
90+
91+
Shows or hides the widget and its children. [QWidget: show](https://docs.nodegui.org/docs/api/NodeWidget#widgetshow)

‎website/docs/api/interfaces/viewprops.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,6 +47,10 @@ Renderer.render(<App />);
4747

4848
[LineEditProps](lineeditprops.md)
4949

50+
[MenuProps](menuprops.md)
51+
52+
[MenuBarProps](menubarprops.md)
53+
5054
[PlainTextEditProps](plaintexteditprops.md)
5155

5256
[ProgressBarProps](progressbarprops.md)

‎website/docs/api/interfaces/windowprops.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ sidebar_label: "WindowProps"
2020
* [geometry](windowprops.md#optional-geometry)
2121
* [id](windowprops.md#optional-id)
2222
* [maxSize](windowprops.md#optional-maxsize)
23+
* [menuBar](windowprops.md#optional-menubar)
2324
* [minSize](windowprops.md#optional-minsize)
2425
* [mouseTracking](windowprops.md#optional-mousetracking)
2526
* [on](windowprops.md#optional-on)
@@ -98,6 +99,12 @@ Sets the maximum size of the widget. [QWidget: setMaximumSize](https://docs.node
9899

99100
___
100101

102+
### `Optional` menuBar
103+
104+
**menuBar**? : *QMenuBar*
105+
106+
___
107+
101108
### `Optional` minSize
102109

103110
**minSize**? : *[Size](../globals.md#size)*

‎website/sidebars.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,12 +34,15 @@ module.exports = {
3434
"api/interfaces/gridviewprops",
3535
"api/interfaces/imageprops",
3636
"api/interfaces/lineeditprops",
37+
"api/interfaces/menubarprops",
38+
"api/interfaces/menuprops",
3739
"api/interfaces/plaintexteditprops",
3840
"api/interfaces/progressbarprops",
3941
"api/interfaces/radiobuttonprops",
4042
"api/interfaces/scrollareaprops",
4143
"api/interfaces/sliderprops",
4244
"api/interfaces/spinboxprops",
45+
"api/interfaces/systemtrayiconprops",
4346
"api/interfaces/tabitemprops",
4447
"api/interfaces/tabprops",
4548
"api/interfaces/textprops",
@@ -49,6 +52,8 @@ module.exports = {
4952
"Classes": [
5053
"api/classes/rngridcolumn",
5154
"api/classes/rngridrow",
55+
"api/classes/rnmenu",
56+
"api/classes/rnmenubar",
5257
"api/classes/renderer"
5358
]
5459
},

0 commit comments

Comments
 (0)
Please sign in to comment.