1/************************************************************** 2 * 3 * Licensed to the Apache Software Foundation (ASF) under one 4 * or more contributor license agreements. See the NOTICE file 5 * distributed with this work for additional information 6 * regarding copyright ownership. The ASF licenses this file 7 * to you under the Apache License, Version 2.0 (the 8 * "License"); you may not use this file except in compliance 9 * with the License. You may obtain a copy of the License at 10 * 11 * http://www.apache.org/licenses/LICENSE-2.0 12 * 13 * Unless required by applicable law or agreed to in writing, 14 * software distributed under the License is distributed on an 15 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 16 * KIND, either express or implied. See the License for the 17 * specific language governing permissions and limitations 18 * under the License. 19 * 20 *************************************************************/ 21 22 23#ifndef __com_sun_star_frame_XStatusbarController_idl__ 24#define __com_sun_star_frame_XStatusbarController_idl__ 25 26#ifndef __com_sun_star_awt_Point_idl__ 27#include <com/sun/star/awt/Point.idl> 28#endif 29 30#ifndef __com_sun_star_awt_MouseEvent_idl__ 31#include <com/sun/star/awt/MouseEvent.idl> 32#endif 33 34#ifndef __com_sun_star_awt_Rectangle_idl__ 35#include <com/sun/star/awt/Rectangle.idl> 36#endif 37 38#ifndef __com_sun_star_awt_XGraphics_idl__ 39#include <com/sun/star/awt/XGraphics.idl> 40#endif 41 42//============================================================================= 43 44module com { module sun { module star { module frame { 45 46//============================================================================= 47/** is an abstract service for a component which offers a more complex user interface 48 to users within a status bar. 49 50 <p> 51 A generic status bar field is represented as a simple text field. A status 52 bar controller can be added to a Statusbar and provide information or 53 functions with a more sophisticated user interface.<br/> 54 A typical example for status bar controller is a zoom chooser. It shows 55 the current zoom and provides general zoom levels on a popup menu 56 that can be activated by a mouse action for context menus. 57 <p> 58 59 @see com::sun::star::frame::XDispatchProvider 60 61 @since OOo 2.0 62 */ 63interface XStatusbarController : ::com::sun::star::uno::XInterface 64{ 65 //============================================================================= 66 /** is called by a status bar if the mouse position is within the controller 67 and a mouse button has been pressed. If the controller has captured the 68 mouse input this function is also called when the mouse position is not 69 within the controller. 70 71 @param aMouseEvent 72 current information about the mouse pointer. 73 74 @return 75 return <TRUE/> if the event should not be processed and <FALSE/> 76 if the event should be processed by the status bar. 77 */ 78 boolean mouseButtonDown( [in] ::com::sun::star::awt::MouseEvent aMouseEvent ); 79 80 //============================================================================= 81 /** is called by a status bar if the mouse position is within the controller 82 and a mouse has been moved. If the controller has captured the 83 mouse input this function is also called when the mouse position is not 84 within the controller. 85 86 @param aMouseEvent 87 current information about the mouse pointer. 88 89 @return 90 return <TRUE/> if the event should not be processed and <FALSE/> 91 if the event should be processed by the status bar. 92 */ 93 boolean mouseMove( [in] ::com::sun::star::awt::MouseEvent aMouseEvent ); 94 95 //============================================================================= 96 /** is called by a status bar if the mouse position is within the controller 97 and a mouse button has been released. If the controller has captured the 98 mouse input this function is also called when the mouse position is not 99 within the controller. 100 101 @param aMouseEvent 102 current information about the mouse pointer. 103 104 @return 105 return <TRUE/> if the event should not be processed and <FALSE/> 106 if the event should be processed by the status bar. 107 */ 108 boolean mouseButtonUp( [in] ::com::sun::star::awt::MouseEvent aMouseEvent ); 109 110 //============================================================================= 111 /** is called by a status bar if a command event is available for a controller. 112 113 @param aPos 114 the current mouse position in pixel. 115 116 @param nCommand 117 describes which command has been invoked. 118 119 @param bMouseEvent 120 <TRUE/> if the command is based on a mouse event, otherwise <FALSE/>. 121 122 @param aData 123 for future use only. 124 */ 125 void command( [in] ::com::sun::star::awt::Point aPos, 126 [in] long nCommand, 127 [in] boolean bMouseEvent, 128 [in] any aData ); 129 130 //============================================================================= 131 /** is called by a status bar if the controller has to update the visual 132 representation. 133 134 @param xGraphics 135 a reference to a <type scope="com::sun::star::awt">XGraphics</type> 136 which has to be used to update the visual representation. 137 138 @param nCommand 139 a <type scope="com::sun::star::awt">Rectangle</type> which 140 determine the output rectangle for all drawing operations 141 142 @param nItemID 143 the unique ID of the control within the status bar. 144 145 @param nStyle 146 reserved for future use. 147 */ 148 void paint( [in] ::com::sun::star::awt::XGraphics xGraphics, 149 [in] ::com::sun::star::awt::Rectangle rOutputRectangle, 150 [in] long nItemId, 151 [in] long nStyle ); 152 153 //============================================================================= 154 /** is called by a status bar if the user clicked with mouse into the 155 field of the corresponding control. 156 */ 157 void click(); 158 159 //============================================================================= 160 /** is called by a status bar if the user double-clicked with mouse 161 into the field of the corresponding control. 162 */ 163 void doubleClick(); 164}; 165 166}; }; }; }; 167 168#endif 169