source: branches/kmk/Lucide/plugins/ludoc/luibutton.idl @ 319

Last change on this file since 319 was 319, checked in by dmik, 12 years ago

branches/kmk: Prototyped input field interfaces.

  • Property svn:executable set to *
File size: 1.8 KB
Line 
1#ifndef luibutton_idl
2#define luibutton_idl
3
4#include <somobj.idl>
5#include <luifield.idl>
6
7/**
8 * LuInputButton represents a button.
9 */
10interface LuInputButton : LuInputField
11{
12    typedef sequence <unsigned long> SiblingSequence;
13
14    /**
15     * Possible values for getButtonType().
16     */
17    enum ButtonType {
18        Undefined, Check, Push, Radio
19    };
20
21    /**
22     * Returns the button type.
23     *
24     * To be overriden. By default, returns Undefined.
25     */
26    ButtonType getButtonType();
27
28    /**
29     * Returns TRUE if the button is checked (for Check and Radio buttons)
30     * and and FALSE otherwise.
31     *
32     * To be overriden. By default, returns FALSE.
33     */
34    boolean getState();
35
36    /**
37     * Sets the checked state of the button (for Check and Radio buttons).
38     *
39     * To be overriden. By default, does nothing.
40     */
41    void setState(in boolean aState);
42
43    /**
44     * Returns the text of the button. For Check buttons, it's the text of the
45     * On state.
46     *
47     * To be overriden. By default, returns NULL.
48     */
49    string getText();
50
51    /**
52     * Returns a sequence of IDs of the buttons in the same radio group as this
53     * Radio button. For other button types, returns NULL.
54     *
55     * Note: SOMMalloc() must be used for all memory allocations.
56     */
57    SiblingSequence *getSiblings();
58
59    /**
60     * Frees the siblings sequence returned by getSiblings().
61     *
62     * Subclasses should never override this method.
63     */
64    void freeSiblings(in SiblingSequence aSiblings);
65
66#ifdef __SOMIDL__
67
68    implementation
69    {
70        releaseorder: getButtonType, getState, setState, getText, getSiblings,
71                      freeSiblings;
72
73        freeSiblings: procedure, noself;
74    };
75
76#endif // __SOMIDL__
77};
78
79#endif // luibutton_idl
80
Note: See TracBrowser for help on using the repository browser.