Add a "signals and callbacks" chapter into the first steps document
This commit is contained in:
parent
43f97a0d6a
commit
bc389b730e
|
@ -358,6 +358,48 @@ remove a connection to a signal handler or a widget. Alternatively, you can
|
||||||
use `delCallbacks()` to remove all existing callbacks from an object.
|
use `delCallbacks()` to remove all existing callbacks from an object.
|
||||||
|
|
||||||
|
|
||||||
|
### The FINAL CUT widgets emit the following default signals ###
|
||||||
|
|
||||||
|
<dl>
|
||||||
|
<dt>FButton</dt>
|
||||||
|
<dd>"clicked"</dd>
|
||||||
|
|
||||||
|
<dt>FCheckMenuItem</dt>
|
||||||
|
<dd>"clicked"<br />"toggled"</dd>
|
||||||
|
|
||||||
|
<dt>FLineEdit</dt>
|
||||||
|
<dd>"activate"<br />"changed"</dd>
|
||||||
|
|
||||||
|
<dt>FListBox</dt>
|
||||||
|
<dd>"clicked"<br />"row-changed"<br />"row-selected"</dd>
|
||||||
|
|
||||||
|
<dt>FListView</dt>
|
||||||
|
<dd>"clicked"<br />"row-changed"</dd>
|
||||||
|
|
||||||
|
<dt>FMenu</dt>
|
||||||
|
<dd>"activate"</dd>
|
||||||
|
|
||||||
|
<dt>FMenuItem</dt>
|
||||||
|
<dd>"activate"<br />"clicked"<br />"deactivate"</dd>
|
||||||
|
|
||||||
|
<dt>FRadioMenuItem</dt>
|
||||||
|
<dd>"clicked"<br />"toggled"</dd>
|
||||||
|
|
||||||
|
<dt>FScrollbar</dt>
|
||||||
|
<dd>"change-value"</dd>
|
||||||
|
|
||||||
|
<dt>FStatusBar</dt>
|
||||||
|
<dd>"activate"</dd>
|
||||||
|
|
||||||
|
<dt>FTextView</dt>
|
||||||
|
<dd>"changed"</dd>
|
||||||
|
|
||||||
|
<dt>FToggleButton</dt>
|
||||||
|
<dd>"clicked"<br />"toggled"</dd>
|
||||||
|
</dl>
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Example of a callback function: ###
|
### Example of a callback function: ###
|
||||||
|
|
||||||
**File:** *callback-function.cpp*
|
**File:** *callback-function.cpp*
|
||||||
|
@ -466,6 +508,7 @@ g++ -O2 -std=c++11 -lfinal callback-method.cpp -o callback-method
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
### Send custom signals ###
|
### Send custom signals ###
|
||||||
|
|
||||||
You can use the `emitCallback()` method to generate a user-defined signal.
|
You can use the `emitCallback()` method to generate a user-defined signal.
|
||||||
|
@ -600,3 +643,4 @@ the above program with gcc:
|
||||||
```cpp
|
```cpp
|
||||||
g++ -O2 -std=c++11 -lfinal emit-signal.cpp -o emit-signal
|
g++ -O2 -std=c++11 -lfinal emit-signal.cpp -o emit-signal
|
||||||
```
|
```
|
||||||
|
The FINAL CUT widgets emit the following default signals:
|
Loading…
Reference in New Issue