xref: /AOO41X/main/offapi/com/sun/star/frame/XStatusbarController.idl (revision c4dc0a1aba8e7aaa49e08ea6b3b605484dad910b)
1d1766043SAndrew Rist/**************************************************************
2cdf0e10cSrcweir *
3d1766043SAndrew Rist * Licensed to the Apache Software Foundation (ASF) under one
4d1766043SAndrew Rist * or more contributor license agreements.  See the NOTICE file
5d1766043SAndrew Rist * distributed with this work for additional information
6d1766043SAndrew Rist * regarding copyright ownership.  The ASF licenses this file
7d1766043SAndrew Rist * to you under the Apache License, Version 2.0 (the
8d1766043SAndrew Rist * "License"); you may not use this file except in compliance
9d1766043SAndrew Rist * with the License.  You may obtain a copy of the License at
10cdf0e10cSrcweir *
11d1766043SAndrew Rist *   http://www.apache.org/licenses/LICENSE-2.0
12cdf0e10cSrcweir *
13d1766043SAndrew Rist * Unless required by applicable law or agreed to in writing,
14d1766043SAndrew Rist * software distributed under the License is distributed on an
15d1766043SAndrew Rist * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16d1766043SAndrew Rist * KIND, either express or implied.  See the License for the
17d1766043SAndrew Rist * specific language governing permissions and limitations
18d1766043SAndrew Rist * under the License.
19cdf0e10cSrcweir *
20d1766043SAndrew Rist *************************************************************/
21d1766043SAndrew Rist
22cdf0e10cSrcweir#ifndef __com_sun_star_frame_XStatusbarController_idl__
23cdf0e10cSrcweir#define __com_sun_star_frame_XStatusbarController_idl__
24cdf0e10cSrcweir
25cdf0e10cSrcweir#include <com/sun/star/awt/MouseEvent.idl>
268f4dfc8eSAriel Constenla-Haile#include <com/sun/star/awt/Point.idl>
27cdf0e10cSrcweir#include <com/sun/star/awt/Rectangle.idl>
28cdf0e10cSrcweir#include <com/sun/star/awt/XGraphics.idl>
298f4dfc8eSAriel Constenla-Haile#include <com/sun/star/frame/XStatusListener.idl>
30d3bacab6SAriel Constenla-Haile#include <com/sun/star/lang/XComponent.idl>
318f4dfc8eSAriel Constenla-Haile#include <com/sun/star/lang/XInitialization.idl>
328f4dfc8eSAriel Constenla-Haile#include <com/sun/star/util/XUpdatable.idl>
33cdf0e10cSrcweir
34cdf0e10cSrcweirmodule com {  module sun {  module star {  module frame {
35cdf0e10cSrcweir
368f4dfc8eSAriel Constenla-Haile/** interface to be implemented by a component offering a more complex user
378f4dfc8eSAriel Constenla-Haile    interface to users within a status bar.
38cdf0e10cSrcweir
39cdf0e10cSrcweir    <p>
40cdf0e10cSrcweir    A generic status bar field is represented as a simple text field. A status
41cdf0e10cSrcweir    bar controller can be added to a Statusbar and provide information or
42cdf0e10cSrcweir    functions with a more sophisticated user interface.<br/>
43cdf0e10cSrcweir    A typical example for status bar controller is a zoom chooser. It shows
44cdf0e10cSrcweir    the current zoom and provides general zoom levels on a popup menu
45cdf0e10cSrcweir    that can be activated by a mouse action for context menus.
46cdf0e10cSrcweir    <p>
47cdf0e10cSrcweir
48cdf0e10cSrcweir    @see com::sun::star::frame::XDispatchProvider
49cdf0e10cSrcweir
50*c4dc0a1aSJürgen Schmidt    @since OpenOffice 2.0
51cdf0e10cSrcweir*/
528f4dfc8eSAriel Constenla-Haileinterface XStatusbarController
53cdf0e10cSrcweir{
54d3bacab6SAriel Constenla-Haile    /** used to control the life-time of the component
55d3bacab6SAriel Constenla-Haile
56d3bacab6SAriel Constenla-Haile        Used by a status bar implementation to control the life-time of
57d3bacab6SAriel Constenla-Haile        a status bar controller. The status bar is the only instance which
58d3bacab6SAriel Constenla-Haile        is allowed to dispose the component.
59d3bacab6SAriel Constenla-Haile     */
60d3bacab6SAriel Constenla-Haile    interface com::sun::star::lang::XComponent;
61d3bacab6SAriel Constenla-Haile
628f4dfc8eSAriel Constenla-Haile    /** used to initialize a component with required arguments.
638f4dfc8eSAriel Constenla-Haile
648f4dfc8eSAriel Constenla-Haile        <p>A status bar controller is initialized with <b>five</b> additional
658f4dfc8eSAriel Constenla-Haile        arguments provided as a sequence of
668f4dfc8eSAriel Constenla-Haile        <type scope="com::sun::star::beans">PropertyValue</type>:</p>
678f4dfc8eSAriel Constenla-Haile
688f4dfc8eSAriel Constenla-Haile        <ul>
698f4dfc8eSAriel Constenla-Haile            <li><b>Frame</b><br/>a <type scope="com::sun::star::frame">XFrame</type>
708f4dfc8eSAriel Constenla-Haile                instance to which the status bar controller belongs.
718f4dfc8eSAriel Constenla-Haile            </li>
728f4dfc8eSAriel Constenla-Haile            <li><b>CommandURL</b><br/>a string which specifies the command
738f4dfc8eSAriel Constenla-Haile                associated with the statusbar controller.</br>
748f4dfc8eSAriel Constenla-Haile                The command is used to identify the status bar controller
758f4dfc8eSAriel Constenla-Haile                implementation.
768f4dfc8eSAriel Constenla-Haile            </li>
778f4dfc8eSAriel Constenla-Haile            <li><b>StatusbarItem</b><br/>a <type scope="com::sun::star::ui">XStatusbarItem</type>
788f4dfc8eSAriel Constenla-Haile                instance which represents the status bar item asociated with
798f4dfc8eSAriel Constenla-Haile                this controller.
808f4dfc8eSAriel Constenla-Haile            </li>
818f4dfc8eSAriel Constenla-Haile            <li><b>ParentWindow</b><br/>a <type scope="com::sun::star::awt">Window</type>
828f4dfc8eSAriel Constenla-Haile                instance which represents the parent window (status bar window).
838f4dfc8eSAriel Constenla-Haile            </li>
848f4dfc8eSAriel Constenla-Haile            <li><b>ModuleName</b><br/>a string which specifies the name of the
858f4dfc8eSAriel Constenla-Haile                office module attached to the frame to which this controller
868f4dfc8eSAriel Constenla-Haile                belongs; the value is taken from
878f4dfc8eSAriel Constenla-Haile                <member scope="com::sun::star::frame">XModuleManager::identify()</member>.
888f4dfc8eSAriel Constenla-Haile            </li>
898f4dfc8eSAriel Constenla-Haile        </ul>
908f4dfc8eSAriel Constenla-Haile    */
918f4dfc8eSAriel Constenla-Haile    interface com::sun::star::lang::XInitialization;
928f4dfc8eSAriel Constenla-Haile
938f4dfc8eSAriel Constenla-Haile    /** with this interface a component can receive events if a feature has
948f4dfc8eSAriel Constenla-Haile        changed.
958f4dfc8eSAriel Constenla-Haile
968f4dfc8eSAriel Constenla-Haile        <p>The status bar controller implementation should register itself as a
978f4dfc8eSAriel Constenla-Haile        listener when its <member scope="com::sun::star::util">XUpdatable</member>
988f4dfc8eSAriel Constenla-Haile        interface has been called.</p>
998f4dfc8eSAriel Constenla-Haile    */
1008f4dfc8eSAriel Constenla-Haile    interface com::sun::star::frame::XStatusListener;
1018f4dfc8eSAriel Constenla-Haile
1028f4dfc8eSAriel Constenla-Haile    /** used to notify an implementation that it needs to add its listener or
1038f4dfc8eSAriel Constenla-Haile        remove and add them again.
1048f4dfc8eSAriel Constenla-Haile
1058f4dfc8eSAriel Constenla-Haile        <p>
1068f4dfc8eSAriel Constenla-Haile        A status bar controller instance is ready for use after this call has
1078f4dfc8eSAriel Constenla-Haile        been made the first time. The status bar implementation guarentees that
1088f4dfc8eSAriel Constenla-Haile        the controller's item window has been added to the status bar and its
1098f4dfc8eSAriel Constenla-Haile        reference is held by it.
1108f4dfc8eSAriel Constenla-Haile        </p>
1118f4dfc8eSAriel Constenla-Haile    */
1128f4dfc8eSAriel Constenla-Haile    interface com::sun::star::util::XUpdatable;
1138f4dfc8eSAriel Constenla-Haile
114cdf0e10cSrcweir    /** is called by a status bar if the mouse position is within the controller
115cdf0e10cSrcweir        and a mouse button has been pressed. If the controller has captured the
116cdf0e10cSrcweir        mouse input this function is also called when the mouse position is not
117cdf0e10cSrcweir        within the controller.
118cdf0e10cSrcweir
119cdf0e10cSrcweir        @param aMouseEvent
120cdf0e10cSrcweir            current information about the mouse pointer.
121cdf0e10cSrcweir
122cdf0e10cSrcweir        @return
123cdf0e10cSrcweir            return <TRUE/> if the event should not be processed and <FALSE/>
124cdf0e10cSrcweir            if the event should be processed by the status bar.
125cdf0e10cSrcweir    */
126cdf0e10cSrcweir    boolean mouseButtonDown( [in] ::com::sun::star::awt::MouseEvent aMouseEvent );
127cdf0e10cSrcweir
128cdf0e10cSrcweir    /** is called by a status bar if the mouse position is within the controller
129cdf0e10cSrcweir        and a mouse has been moved. If the controller has captured the
130cdf0e10cSrcweir        mouse input this function is also called when the mouse position is not
131cdf0e10cSrcweir        within the controller.
132cdf0e10cSrcweir
133cdf0e10cSrcweir        @param aMouseEvent
134cdf0e10cSrcweir            current information about the mouse pointer.
135cdf0e10cSrcweir
136cdf0e10cSrcweir        @return
137cdf0e10cSrcweir            return <TRUE/> if the event should not be processed and <FALSE/>
138cdf0e10cSrcweir            if the event should be processed by the status bar.
139cdf0e10cSrcweir    */
140cdf0e10cSrcweir    boolean mouseMove( [in] ::com::sun::star::awt::MouseEvent aMouseEvent );
141cdf0e10cSrcweir
142cdf0e10cSrcweir    /** is called by a status bar if the mouse position is within the controller
143cdf0e10cSrcweir        and a mouse button has been released. If the controller has captured the
144cdf0e10cSrcweir        mouse input this function is also called when the mouse position is not
145cdf0e10cSrcweir        within the controller.
146cdf0e10cSrcweir
147cdf0e10cSrcweir        @param aMouseEvent
148cdf0e10cSrcweir            current information about the mouse pointer.
149cdf0e10cSrcweir
150cdf0e10cSrcweir        @return
151cdf0e10cSrcweir            return <TRUE/> if the event should not be processed and <FALSE/>
152cdf0e10cSrcweir            if the event should be processed by the status bar.
153cdf0e10cSrcweir    */
154cdf0e10cSrcweir    boolean mouseButtonUp( [in] ::com::sun::star::awt::MouseEvent aMouseEvent );
155cdf0e10cSrcweir
156cdf0e10cSrcweir    /** is called by a status bar if a command event is available for a controller.
157cdf0e10cSrcweir
158cdf0e10cSrcweir        @param aPos
159cdf0e10cSrcweir            the current mouse position in pixel.
160cdf0e10cSrcweir
161cdf0e10cSrcweir        @param nCommand
162cdf0e10cSrcweir            describes which command has been invoked.
1638f4dfc8eSAriel Constenla-Haile            <br/>See <type scope="com::sun::star::awt">Command</type> for
1648f4dfc8eSAriel Constenla-Haile            possible values.
165cdf0e10cSrcweir
166cdf0e10cSrcweir        @param bMouseEvent
167cdf0e10cSrcweir            <TRUE/> if the command is based on a mouse event, otherwise <FALSE/>.
168cdf0e10cSrcweir
169cdf0e10cSrcweir        @param aData
170cdf0e10cSrcweir            for future use only.
171cdf0e10cSrcweir    */
172cdf0e10cSrcweir    void command( [in] ::com::sun::star::awt::Point aPos,
173cdf0e10cSrcweir                  [in] long nCommand,
174cdf0e10cSrcweir                  [in] boolean bMouseEvent,
175cdf0e10cSrcweir                  [in] any aData );
176cdf0e10cSrcweir
177cdf0e10cSrcweir    /** is called by a status bar if the controller has to update the visual
178cdf0e10cSrcweir        representation.
179cdf0e10cSrcweir
180cdf0e10cSrcweir        @param xGraphics
181cdf0e10cSrcweir            a reference to a <type scope="com::sun::star::awt">XGraphics</type>
182cdf0e10cSrcweir            which has to be used to update the visual representation.
183cdf0e10cSrcweir
184cdf0e10cSrcweir        @param nCommand
185cdf0e10cSrcweir            a <type scope="com::sun::star::awt">Rectangle</type> which
186cdf0e10cSrcweir            determine the output rectangle for all drawing operations
187cdf0e10cSrcweir
188cdf0e10cSrcweir        @param nStyle
189cdf0e10cSrcweir            reserved for future use.
190cdf0e10cSrcweir    */
191cdf0e10cSrcweir    void paint( [in] ::com::sun::star::awt::XGraphics xGraphics,
192cdf0e10cSrcweir                [in] ::com::sun::star::awt::Rectangle rOutputRectangle,
193cdf0e10cSrcweir                [in] long nStyle );
194cdf0e10cSrcweir
195cdf0e10cSrcweir    /** is called by a status bar if the user clicked with mouse into the
196cdf0e10cSrcweir        field of the corresponding control.
197cdf0e10cSrcweir
1988f4dfc8eSAriel Constenla-Haile        @param aPos
1998f4dfc8eSAriel Constenla-Haile            the current mouse position in pixel.
2008f4dfc8eSAriel Constenla-Haile    */
2018f4dfc8eSAriel Constenla-Haile    void click( [in] ::com::sun::star::awt::Point aPos );
2028f4dfc8eSAriel Constenla-Haile
203cdf0e10cSrcweir    /** is called by a status bar if the user double-clicked with mouse
204cdf0e10cSrcweir        into the field of the corresponding control.
2058f4dfc8eSAriel Constenla-Haile
2068f4dfc8eSAriel Constenla-Haile        @param aPos
2078f4dfc8eSAriel Constenla-Haile            the current mouse position in pixel.
208cdf0e10cSrcweir    */
2098f4dfc8eSAriel Constenla-Haile    void doubleClick( [in] ::com::sun::star::awt::Point aPos );
210cdf0e10cSrcweir};
211cdf0e10cSrcweir
212cdf0e10cSrcweir}; }; }; };
213cdf0e10cSrcweir
214cdf0e10cSrcweir#endif
215