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