1 /* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
3 * This file is part of the LibreOffice project.
5 * This Source Code Form is subject to the terms of the Mozilla Public
6 * License, v. 2.0. If a copy of the MPL was not distributed with this
7 * file, You can obtain one at http://mozilla.org/MPL/2.0/.
9 * This file incorporates work covered by the following license notice:
11 * Licensed to the Apache Software Foundation (ASF) under one or more
12 * contributor license agreements. See the NOTICE file distributed
13 * with this work for additional information regarding copyright
14 * ownership. The ASF licenses this file to you under the Apache
15 * License, Version 2.0 (the "License"); you may not use this file
16 * except in compliance with the License. You may obtain a copy of
17 * the License at http://www.apache.org/licenses/LICENSE-2.0 .
19 #ifndef __com_sun_star_frame_XStatusbarController_idl__
20 #define __com_sun_star_frame_XStatusbarController_idl__
22 #include
<com
/sun
/star
/awt
/MouseEvent.idl
>
23 #include
<com
/sun
/star
/awt
/Point.idl
>
24 #include
<com
/sun
/star
/awt
/Rectangle.idl
>
25 #include
<com
/sun
/star
/awt
/XGraphics.idl
>
26 #include
<com
/sun
/star
/frame
/XStatusListener.idl
>
27 #include
<com
/sun
/star
/lang
/XComponent.idl
>
28 #include
<com
/sun
/star
/lang
/XInitialization.idl
>
29 #include
<com
/sun
/star
/util
/XUpdatable.idl
>
31 module com
{ module sun
{ module star
{ module frame
{
33 /** interface to be implemented by a component offering a more complex user
34 interface to users within a status bar.
37 A generic status bar field is represented as a simple text field. A status
38 bar controller can be added to a Statusbar and provide information or
39 functions with a more sophisticated user interface.<br/>
40 A typical example for status bar controller is a zoom chooser. It shows
41 the current zoom and provides general zoom levels on a pop-up menu
42 that can be activated by a mouse action for context menus.
45 @see com::sun::star::frame::XDispatchProvider
49 interface XStatusbarController
51 /** used to control the life-time of the component
53 Used by a status bar implementation to control the life-time of
54 a status bar controller. The status bar is the only instance which
55 is allowed to dispose the component.
57 interface com
::sun
::star
::lang
::XComponent
;
59 /** used to initialize a component with required arguments.
61 <p>A status bar controller is initialized with <b>five</b> additional
62 arguments provided as a sequence of
63 com::sun::star::beans::PropertyValue:</p>
66 <li><b>Frame</b><br/>a com::sun::star::frame::XFrame
67 instance to which the status bar controller belongs.
69 <li><b>CommandURL</b><br/>a string which specifies the command
70 associated with the statusbar controller.<br>
71 The command is used to identify the status bar controller
74 <li><b>StatusbarItem</b><br/>a com::sun::star::ui::XStatusbarItem
75 instance which represents the status bar item associated with
78 <li><b>ParentWindow</b><br/>a com::sun::star::awt::Window
79 instance which represents the parent window (status bar window).
81 <li><b>ModuleName</b><br/>a string which specifies the name of the
82 office module attached to the frame to which this controller
83 belongs; the value is taken from
84 com::sun::star::frame::XModuleManager::identify().
88 interface com
::sun
::star
::lang
::XInitialization
;
90 /** with this interface a component can receive events if a feature has
93 <p>The status bar controller implementation should register itself as a
94 listener when its com::sun::star::util::XUpdatable
95 interface has been called.</p>
97 interface com
::sun
::star
::frame
::XStatusListener
;
99 /** used to notify an implementation that it needs to add its listener or
100 remove and add them again.
103 A status bar controller instance is ready for use after this call has
104 been made the first time. The status bar implementation guarantees that
105 the controller's item window has been added to the status bar and its
106 reference is held by it.
109 interface com
::sun
::star
::util
::XUpdatable
;
111 /** is called by a status bar if the mouse position is within the controller
112 and a mouse button has been pressed. If the controller has captured the
113 mouse input this function is also called when the mouse position is not
114 within the controller.
117 current information about the mouse pointer.
120 return `TRUE` if the event should not be processed and `FALSE`
121 if the event should be processed by the status bar.
123 boolean mouseButtonDown
( [in] ::com
::sun
::star
::awt
::MouseEvent aMouseEvent
);
125 /** is called by a status bar if the mouse position is within the controller
126 and a mouse has been moved. If the controller has captured the
127 mouse input this function is also called when the mouse position is not
128 within the controller.
131 current information about the mouse pointer.
134 return `TRUE` if the event should not be processed and `FALSE`
135 if the event should be processed by the status bar.
137 boolean mouseMove
( [in] ::com
::sun
::star
::awt
::MouseEvent aMouseEvent
);
139 /** is called by a status bar if the mouse position is within the controller
140 and a mouse button has been released. If the controller has captured the
141 mouse input this function is also called when the mouse position is not
142 within the controller.
145 current information about the mouse pointer.
148 return `TRUE` if the event should not be processed and `FALSE`
149 if the event should be processed by the status bar.
151 boolean mouseButtonUp
( [in] ::com
::sun
::star
::awt
::MouseEvent aMouseEvent
);
153 /** is called by a status bar if a command event is available for a controller.
156 the current mouse position in pixel.
159 describes which command has been invoked.
160 <br/>See com::sun::star::awt::Command for
164 `TRUE` if the command is based on a mouse event, otherwise `FALSE`.
169 void command
( [in] ::com
::sun
::star
::awt
::Point aPos
,
171 [in] boolean bMouseEvent
,
174 /** is called by a status bar if the controller has to update the visual
178 a reference to a com::sun::star::awt::XGraphics
179 which has to be used to update the visual representation.
181 @param OutputRectangle
182 a com::sun::star::awt::Rectangle which
183 determine the output rectangle for all drawing operations
186 reserved for future use.
188 void paint
( [in] ::com
::sun
::star
::awt
::XGraphics xGraphics
,
189 [in] ::com
::sun
::star
::awt
::Rectangle OutputRectangle
,
192 /** is called by a status bar if the user clicked with mouse into the
193 field of the corresponding control.
196 the current mouse position in pixel.
198 void click
( [in] ::com
::sun
::star
::awt
::Point aPos
);
200 /** is called by a status bar if the user double-clicked with mouse
201 into the field of the corresponding control.
204 the current mouse position in pixel.
206 void doubleClick
( [in] ::com
::sun
::star
::awt
::Point aPos
);
213 /* vim:set shiftwidth=4 softtabstop=4 expandtab: */