69 lines
8.9 KiB
HTML
69 lines
8.9 KiB
HTML
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
|
||
<html xmlns="http://www.w3.org/1999/xhtml"><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /><title>The Be Book - System Overview - The Interface Kit</title><link rel="stylesheet" href="be_book.css" type="text/css" media="all" /><link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./images/favicon.ico" /><!--[if IE]>
|
||
<link rel="stylesheet" type="text/css" href="be_book_ie.css" />
|
||
<![endif]--><meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /><meta name="keywords" content="Access, BeOS, BeBook, API" /><link rel="start" href="index.html" title="The Be Book" /><link rel="up" href="TheInterfaceKit_Overview.html" title="The Interface Kit" /><link rel="prev" href="BColorControl_Overview.html" title="BColorControl" /><link rel="next" href="BDragger_Overview.html" title="BDragger" /></head><body><div id="header"><div id="headerT"><div id="headerTL"><a accesskey="p" href="BColorControl_Overview.html" title="BColorControl"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a accesskey="u" href="TheInterfaceKit_Overview.html" title="The Interface Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a accesskey="n" href="BDragger_Overview.html" title="BDragger"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="headerTR"><div id="navigpeople"><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div><div class="navigboxed" id="navigindex"><a accesskey="i" href="ClassIndex.html" title="Index">I</a></div><div class="navigboxed" id="naviglang" title="English">en</div></div><div id="headerTC">The Be Book - System Overview - The Interface Kit</div></div><div id="headerB">Prev: <a href="BColorControl_Overview.html">BColorControl</a> Up: <a href="TheInterfaceKit_Overview.html">The Interface Kit</a> Next: <a href="BDragger_Overview.html">BDragger</a></div><hr /></div><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><div xmlns:d="http://docbook.org/ns/docbook"><h2 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="BControl_Overview"></a>BControl</h2></div></div></div><a id="id547776" class="indexterm"></a><p>
|
||
<a class="link" href="BControl.html" title="BControl"><code class="classname">BControl</code></a>
|
||
is an abstract class for views that draw control devices on the
|
||
screen. Objects that inherit from
|
||
<a class="link" href="BControl.html" title="BControl"><code class="classname">BControl</code></a>
|
||
emulate, in software, real-world control devices—like the switches
|
||
and levers on a machine, the check lists and blank lines on a form to fill
|
||
out, or the dials and knobs on a home appliance.
|
||
</p><p>
|
||
Controls translate the messages that report generic mouse and keyboard
|
||
events into other messages with more specific instructions for the
|
||
application. A <a class="link" href="BControl.html" title="BControl"><code class="classname">BControl</code></a>
|
||
object can be customized by setting the message
|
||
it posts when invoked and the target object that should handle the
|
||
message.
|
||
</p><p>
|
||
Controls also register a current value, stored as an <span class="type">int32</span> integer that's
|
||
typically set to <code class="constant">B_CONTROL_ON</code> or <code class="constant">B_CONTROL_OFF</code>. The value is changed only
|
||
by calling
|
||
<a class="link" href="BControl.html#BControl_SetValue" title="SetValue(), Value()"><code class="methodname">SetValue()</code></a>,
|
||
a virtual function that derived classes can implement to be notified of the change.
|
||
</p><div class="section"><div xmlns="" xmlns:d="http://docbook.org/ns/docbook" class="titlepage"><div><hr /><div xmlns:d="http://docbook.org/ns/docbook"><h3 xmlns="http://www.w3.org/1999/xhtml" class="title"><a id="id547856"></a>Derived Classes</h3></div></div></div><p>
|
||
The Interface Kit currently includes six classes derived from
|
||
<a class="link" href="BControl.html" title="BControl"><code class="classname">BControl</code></a>
|
||
—
|
||
<a class="link" href="BButton.html" title="BButton"><code class="classname">BButton</code></a>,
|
||
<a class="link" href="BPictureButton.html" title="BPictureButton"><code class="classname">BPictureButton</code></a>,
|
||
<a class="link" href="BRadioButton.html" title="BRadioButton"><code class="classname">BRadioButton</code></a>,
|
||
<a class="link" href="BCheckBox.html" title="BCheckBox"><code class="classname">BCheckBox</code></a>,
|
||
<a class="link" href="BColorControl.html" title="BColorControl"><code class="classname">BColorControl</code></a>,
|
||
and <a class="link" href="BTextControl.html" title="BTextControl"><code class="classname">BTextControl</code></a>.
|
||
In addition, it has two classes—
|
||
<a class="link" href="BListView.html" title="BListView"><code class="classname">BListView</code></a> and
|
||
<a class="link" href="BMenuItem.html" title="BMenuItem"><code class="classname">BMenuItem</code></a>
|
||
—that implement control
|
||
devices but are not derived from this class.
|
||
<a class="link" href="BListView.html" title="BListView"><code class="classname">BListView</code></a>
|
||
and its subclass,
|
||
<a class="link" href="BOutlineListView.html" title="BOutlineListView"><code class="classname">BOutlineListView</code></a>,
|
||
share an interface with the
|
||
<a class="link" href="BList.html" title="BList"><code class="classname">BList</code></a>
|
||
class (of the Support Kit) and
|
||
<a class="link" href="BMenuItem.html" title="BMenuItem"><code class="classname">BMenuItem</code></a>
|
||
is designed to work with the other classes in the menu system. Like
|
||
<a class="link" href="BControl.html" title="BControl"><code class="classname">BControl</code></a>,
|
||
<a class="link" href="BListView.html" title="BListView"><code class="classname">BListView</code></a> and
|
||
<a class="link" href="BMenuItem.html" title="BMenuItem"><code class="classname">BMenuItem</code></a>
|
||
inherit from the Application Kit's
|
||
<a class="link" href="BInvoker.html" title="BInvoker"><code class="classname">BInvoker</code></a> class.
|
||
</p><p>
|
||
As <a class="link" href="BListView.html" title="BListView"><code class="classname">BListView</code></a> and
|
||
<a class="link" href="BMenuItem.html" title="BMenuItem"><code class="classname">BMenuItem</code></a> demonstrate, it's possible to implement a
|
||
control device that's not a
|
||
<a class="link" href="BControl.html" title="BControl"><code class="classname">BControl</code></a>.
|
||
However, it's simpler to take
|
||
advantage of the code that's already provided by the <a class="link" href="BControl.html" title="BControl"><code class="classname">BControl</code></a> class. That
|
||
way you can keep a simple programming interface and avoid reimplementing
|
||
functions that
|
||
<a class="link" href="BControl.html" title="BControl"><code class="classname">BControl</code></a> has defined for you. If your application defines
|
||
its own control devices—dials, sliders, selection lists, and the
|
||
like—they should be derived from <a class="link" href="BControl.html" title="BControl"><code class="classname">BControl</code></a>.
|
||
</p></div></div><div id="footer"><hr /><div id="footerT">Prev: <a href="BColorControl_Overview.html">BColorControl</a> Up: <a href="TheInterfaceKit_Overview.html">The Interface Kit</a> Next: <a href="BDragger_Overview.html">BDragger</a> </div><div id="footerB"><div id="footerBL"><a href="BColorControl_Overview.html" title="BColorControl"><img src="./images/navigation/prev.png" alt="Prev" /></a> <a href="TheInterfaceKit_Overview.html" title="The Interface Kit"><img src="./images/navigation/up.png" alt="Up" /></a> <a href="BDragger_Overview.html" title="BDragger"><img src="./images/navigation/next.png" alt="Next" /></a></div><div id="footerBR"><div><a href="http://www.haiku-os.org"><img src="./images/People_24.png" alt="haiku-os.org" title="Visit The Haiku Website" /></a></div><div class="navighome" title="Home"><a accesskey="h" href="index.html"><img src="./images/navigation/home.png" alt="Home" /></a></div></div><div id="footerBC"><a href="http://www.access-company.com/home.html" title="ACCESS Co."><img alt="Access Company" src="./images/access_logo.png" /></a></div></div></div><div id="licenseFooter"><div id="licenseFooterBL"><a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/" title="Creative Commons License"><img alt="Creative Commons License" style="border-width:0" src="https://licensebuttons.net/l/by-nc-nd/3.0/88x31.png" /></a></div><div id="licenseFooterBR"><a href="./LegalNotice.html">Legal Notice</a></div><div id="licenseFooterBC"><span id="licenseText">This work is licensed under a
|
||
<a rel="license" href="http://creativecommons.org/licenses/by-nc-nd/3.0/">Creative
|
||
Commons Attribution-Non commercial-No Derivative Works 3.0 License</a>.</span></div></div></body></html>
|