1/*************************************************************************
2 *
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 *
5 * Copyright 2000, 2010 Oracle and/or its affiliates.
6 *
7 * OpenOffice.org - a multi-platform office productivity suite
8 *
9 * This file is part of OpenOffice.org.
10 *
11 * OpenOffice.org is free software: you can redistribute it and/or modify
12 * it under the terms of the GNU Lesser General Public License version 3
13 * only, as published by the Free Software Foundation.
14 *
15 * OpenOffice.org is distributed in the hope that it will be useful,
16 * but WITHOUT ANY WARRANTY; without even the implied warranty of
17 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
18 * GNU Lesser General Public License version 3 for more details
19 * (a copy is included in the LICENSE file that accompanied this code).
20 *
21 * You should have received a copy of the GNU Lesser General Public License
22 * version 3 along with OpenOffice.org.  If not, see
23 * <http://www.openoffice.org/license.html>
24 * for a copy of the LGPLv3 License.
25 *
26 ************************************************************************/
27#ifndef __com_sun_star_frame_XStatusbarController_idl__
28#define __com_sun_star_frame_XStatusbarController_idl__
29
30#ifndef __com_sun_star_awt_Point_idl__
31#include <com/sun/star/awt/Point.idl>
32#endif
33
34#ifndef __com_sun_star_awt_MouseEvent_idl__
35#include <com/sun/star/awt/MouseEvent.idl>
36#endif
37
38#ifndef __com_sun_star_awt_Rectangle_idl__
39#include <com/sun/star/awt/Rectangle.idl>
40#endif
41
42#ifndef __com_sun_star_awt_XGraphics_idl__
43#include <com/sun/star/awt/XGraphics.idl>
44#endif
45
46//=============================================================================
47
48module com {  module sun {  module star {  module frame {
49
50//=============================================================================
51/** is an abstract service for a component which offers a more complex user interface
52    to users within a status bar.
53
54    <p>
55    A generic status bar field is represented as a simple text field. A status
56    bar controller can be added to a Statusbar and provide information or
57    functions with a more sophisticated user interface.<br/>
58    A typical example for status bar controller is a zoom chooser. It shows
59    the current zoom and provides general zoom levels on a popup menu
60    that can be activated by a mouse action for context menus.
61    <p>
62
63    @see com::sun::star::frame::XDispatchProvider
64
65    @since OOo 2.0
66 */
67interface XStatusbarController : ::com::sun::star::uno::XInterface
68{
69    //=============================================================================
70    /** is called by a status bar if the mouse position is within the controller
71        and a mouse button has been pressed. If the controller has captured the
72        mouse input this function is also called when the mouse position is not
73        within the controller.
74
75        @param aMouseEvent
76            current information about the mouse pointer.
77
78        @return
79            return <TRUE/> if the event should not be processed and <FALSE/>
80            if the event should be processed by the status bar.
81    */
82    boolean mouseButtonDown( [in] ::com::sun::star::awt::MouseEvent aMouseEvent );
83
84    //=============================================================================
85    /** is called by a status bar if the mouse position is within the controller
86        and a mouse has been moved. If the controller has captured the
87        mouse input this function is also called when the mouse position is not
88        within the controller.
89
90        @param aMouseEvent
91            current information about the mouse pointer.
92
93        @return
94            return <TRUE/> if the event should not be processed and <FALSE/>
95            if the event should be processed by the status bar.
96    */
97    boolean mouseMove( [in] ::com::sun::star::awt::MouseEvent aMouseEvent );
98
99    //=============================================================================
100    /** is called by a status bar if the mouse position is within the controller
101        and a mouse button has been released. If the controller has captured the
102        mouse input this function is also called when the mouse position is not
103        within the controller.
104
105        @param aMouseEvent
106            current information about the mouse pointer.
107
108        @return
109            return <TRUE/> if the event should not be processed and <FALSE/>
110            if the event should be processed by the status bar.
111    */
112    boolean mouseButtonUp( [in] ::com::sun::star::awt::MouseEvent aMouseEvent );
113
114    //=============================================================================
115    /** is called by a status bar if a command event is available for a controller.
116
117        @param aPos
118            the current mouse position in pixel.
119
120        @param nCommand
121            describes which command has been invoked.
122
123        @param bMouseEvent
124            <TRUE/> if the command is based on a mouse event, otherwise <FALSE/>.
125
126        @param aData
127            for future use only.
128    */
129    void command( [in] ::com::sun::star::awt::Point aPos,
130                  [in] long nCommand,
131                  [in] boolean bMouseEvent,
132                  [in] any aData );
133
134    //=============================================================================
135    /** is called by a status bar if the controller has to update the visual
136        representation.
137
138        @param xGraphics
139            a reference to a <type scope="com::sun::star::awt">XGraphics</type>
140            which has to be used to update the visual representation.
141
142        @param nCommand
143            a <type scope="com::sun::star::awt">Rectangle</type> which
144            determine the output rectangle for all drawing operations
145
146        @param nItemID
147            the unique ID of the control within the status bar.
148
149        @param nStyle
150            reserved for future use.
151    */
152    void paint( [in] ::com::sun::star::awt::XGraphics xGraphics,
153                [in] ::com::sun::star::awt::Rectangle rOutputRectangle,
154                [in] long nItemId,
155                [in] long nStyle );
156
157    //=============================================================================
158    /** is called by a status bar if the user clicked with mouse into the
159        field of the corresponding control.
160    */
161    void click();
162
163    //=============================================================================
164    /** is called by a status bar if the user double-clicked with mouse
165        into the field of the corresponding control.
166    */
167    void doubleClick();
168};
169
170}; }; }; };
171
172#endif
173