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> 26*8f4dfc8eSAriel 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> 29*8f4dfc8eSAriel Constenla-Haile#include <com/sun/star/frame/XStatusListener.idl> 30*8f4dfc8eSAriel Constenla-Haile#include <com/sun/star/lang/XInitialization.idl> 31*8f4dfc8eSAriel Constenla-Haile#include <com/sun/star/util/XUpdatable.idl> 32cdf0e10cSrcweir 33cdf0e10cSrcweirmodule com { module sun { module star { module frame { 34cdf0e10cSrcweir 35*8f4dfc8eSAriel Constenla-Haile/** interface to be implemented by a component offering a more complex user 36*8f4dfc8eSAriel Constenla-Haile interface to users within a status bar. 37cdf0e10cSrcweir 38cdf0e10cSrcweir <p> 39cdf0e10cSrcweir A generic status bar field is represented as a simple text field. A status 40cdf0e10cSrcweir bar controller can be added to a Statusbar and provide information or 41cdf0e10cSrcweir functions with a more sophisticated user interface.<br/> 42cdf0e10cSrcweir A typical example for status bar controller is a zoom chooser. It shows 43cdf0e10cSrcweir the current zoom and provides general zoom levels on a popup menu 44cdf0e10cSrcweir that can be activated by a mouse action for context menus. 45cdf0e10cSrcweir <p> 46cdf0e10cSrcweir 47cdf0e10cSrcweir @see com::sun::star::frame::XDispatchProvider 48cdf0e10cSrcweir 49cdf0e10cSrcweir @since OOo 2.0 50cdf0e10cSrcweir*/ 51*8f4dfc8eSAriel Constenla-Haileinterface XStatusbarController 52cdf0e10cSrcweir{ 53*8f4dfc8eSAriel Constenla-Haile /** used to initialize a component with required arguments. 54*8f4dfc8eSAriel Constenla-Haile 55*8f4dfc8eSAriel Constenla-Haile <p>A status bar controller is initialized with <b>five</b> additional 56*8f4dfc8eSAriel Constenla-Haile arguments provided as a sequence of 57*8f4dfc8eSAriel Constenla-Haile <type scope="com::sun::star::beans">PropertyValue</type>:</p> 58*8f4dfc8eSAriel Constenla-Haile 59*8f4dfc8eSAriel Constenla-Haile <ul> 60*8f4dfc8eSAriel Constenla-Haile <li><b>Frame</b><br/>a <type scope="com::sun::star::frame">XFrame</type> 61*8f4dfc8eSAriel Constenla-Haile instance to which the status bar controller belongs. 62*8f4dfc8eSAriel Constenla-Haile </li> 63*8f4dfc8eSAriel Constenla-Haile <li><b>CommandURL</b><br/>a string which specifies the command 64*8f4dfc8eSAriel Constenla-Haile associated with the statusbar controller.</br> 65*8f4dfc8eSAriel Constenla-Haile The command is used to identify the status bar controller 66*8f4dfc8eSAriel Constenla-Haile implementation. 67*8f4dfc8eSAriel Constenla-Haile </li> 68*8f4dfc8eSAriel Constenla-Haile <li><b>StatusbarItem</b><br/>a <type scope="com::sun::star::ui">XStatusbarItem</type> 69*8f4dfc8eSAriel Constenla-Haile instance which represents the status bar item asociated with 70*8f4dfc8eSAriel Constenla-Haile this controller. 71*8f4dfc8eSAriel Constenla-Haile </li> 72*8f4dfc8eSAriel Constenla-Haile <li><b>ParentWindow</b><br/>a <type scope="com::sun::star::awt">Window</type> 73*8f4dfc8eSAriel Constenla-Haile instance which represents the parent window (status bar window). 74*8f4dfc8eSAriel Constenla-Haile </li> 75*8f4dfc8eSAriel Constenla-Haile <li><b>ModuleName</b><br/>a string which specifies the name of the 76*8f4dfc8eSAriel Constenla-Haile office module attached to the frame to which this controller 77*8f4dfc8eSAriel Constenla-Haile belongs; the value is taken from 78*8f4dfc8eSAriel Constenla-Haile <member scope="com::sun::star::frame">XModuleManager::identify()</member>. 79*8f4dfc8eSAriel Constenla-Haile </li> 80*8f4dfc8eSAriel Constenla-Haile </ul> 81*8f4dfc8eSAriel Constenla-Haile */ 82*8f4dfc8eSAriel Constenla-Haile interface com::sun::star::lang::XInitialization; 83*8f4dfc8eSAriel Constenla-Haile 84*8f4dfc8eSAriel Constenla-Haile /** with this interface a component can receive events if a feature has 85*8f4dfc8eSAriel Constenla-Haile changed. 86*8f4dfc8eSAriel Constenla-Haile 87*8f4dfc8eSAriel Constenla-Haile <p>The status bar controller implementation should register itself as a 88*8f4dfc8eSAriel Constenla-Haile listener when its <member scope="com::sun::star::util">XUpdatable</member> 89*8f4dfc8eSAriel Constenla-Haile interface has been called.</p> 90*8f4dfc8eSAriel Constenla-Haile */ 91*8f4dfc8eSAriel Constenla-Haile interface com::sun::star::frame::XStatusListener; 92*8f4dfc8eSAriel Constenla-Haile 93*8f4dfc8eSAriel Constenla-Haile /** used to notify an implementation that it needs to add its listener or 94*8f4dfc8eSAriel Constenla-Haile remove and add them again. 95*8f4dfc8eSAriel Constenla-Haile 96*8f4dfc8eSAriel Constenla-Haile <p> 97*8f4dfc8eSAriel Constenla-Haile A status bar controller instance is ready for use after this call has 98*8f4dfc8eSAriel Constenla-Haile been made the first time. The status bar implementation guarentees that 99*8f4dfc8eSAriel Constenla-Haile the controller's item window has been added to the status bar and its 100*8f4dfc8eSAriel Constenla-Haile reference is held by it. 101*8f4dfc8eSAriel Constenla-Haile </p> 102*8f4dfc8eSAriel Constenla-Haile */ 103*8f4dfc8eSAriel Constenla-Haile interface com::sun::star::util::XUpdatable; 104*8f4dfc8eSAriel Constenla-Haile 105cdf0e10cSrcweir /** is called by a status bar if the mouse position is within the controller 106cdf0e10cSrcweir and a mouse button has been pressed. If the controller has captured the 107cdf0e10cSrcweir mouse input this function is also called when the mouse position is not 108cdf0e10cSrcweir within the controller. 109cdf0e10cSrcweir 110cdf0e10cSrcweir @param aMouseEvent 111cdf0e10cSrcweir current information about the mouse pointer. 112cdf0e10cSrcweir 113cdf0e10cSrcweir @return 114cdf0e10cSrcweir return <TRUE/> if the event should not be processed and <FALSE/> 115cdf0e10cSrcweir if the event should be processed by the status bar. 116cdf0e10cSrcweir */ 117cdf0e10cSrcweir boolean mouseButtonDown( [in] ::com::sun::star::awt::MouseEvent aMouseEvent ); 118cdf0e10cSrcweir 119cdf0e10cSrcweir /** is called by a status bar if the mouse position is within the controller 120cdf0e10cSrcweir and a mouse has been moved. If the controller has captured the 121cdf0e10cSrcweir mouse input this function is also called when the mouse position is not 122cdf0e10cSrcweir within the controller. 123cdf0e10cSrcweir 124cdf0e10cSrcweir @param aMouseEvent 125cdf0e10cSrcweir current information about the mouse pointer. 126cdf0e10cSrcweir 127cdf0e10cSrcweir @return 128cdf0e10cSrcweir return <TRUE/> if the event should not be processed and <FALSE/> 129cdf0e10cSrcweir if the event should be processed by the status bar. 130cdf0e10cSrcweir */ 131cdf0e10cSrcweir boolean mouseMove( [in] ::com::sun::star::awt::MouseEvent aMouseEvent ); 132cdf0e10cSrcweir 133cdf0e10cSrcweir /** is called by a status bar if the mouse position is within the controller 134cdf0e10cSrcweir and a mouse button has been released. If the controller has captured the 135cdf0e10cSrcweir mouse input this function is also called when the mouse position is not 136cdf0e10cSrcweir within the controller. 137cdf0e10cSrcweir 138cdf0e10cSrcweir @param aMouseEvent 139cdf0e10cSrcweir current information about the mouse pointer. 140cdf0e10cSrcweir 141cdf0e10cSrcweir @return 142cdf0e10cSrcweir return <TRUE/> if the event should not be processed and <FALSE/> 143cdf0e10cSrcweir if the event should be processed by the status bar. 144cdf0e10cSrcweir */ 145cdf0e10cSrcweir boolean mouseButtonUp( [in] ::com::sun::star::awt::MouseEvent aMouseEvent ); 146cdf0e10cSrcweir 147cdf0e10cSrcweir /** is called by a status bar if a command event is available for a controller. 148cdf0e10cSrcweir 149cdf0e10cSrcweir @param aPos 150cdf0e10cSrcweir the current mouse position in pixel. 151cdf0e10cSrcweir 152cdf0e10cSrcweir @param nCommand 153cdf0e10cSrcweir describes which command has been invoked. 154*8f4dfc8eSAriel Constenla-Haile <br/>See <type scope="com::sun::star::awt">Command</type> for 155*8f4dfc8eSAriel Constenla-Haile possible values. 156cdf0e10cSrcweir 157cdf0e10cSrcweir @param bMouseEvent 158cdf0e10cSrcweir <TRUE/> if the command is based on a mouse event, otherwise <FALSE/>. 159cdf0e10cSrcweir 160cdf0e10cSrcweir @param aData 161cdf0e10cSrcweir for future use only. 162cdf0e10cSrcweir */ 163cdf0e10cSrcweir void command( [in] ::com::sun::star::awt::Point aPos, 164cdf0e10cSrcweir [in] long nCommand, 165cdf0e10cSrcweir [in] boolean bMouseEvent, 166cdf0e10cSrcweir [in] any aData ); 167cdf0e10cSrcweir 168cdf0e10cSrcweir /** is called by a status bar if the controller has to update the visual 169cdf0e10cSrcweir representation. 170cdf0e10cSrcweir 171cdf0e10cSrcweir @param xGraphics 172cdf0e10cSrcweir a reference to a <type scope="com::sun::star::awt">XGraphics</type> 173cdf0e10cSrcweir which has to be used to update the visual representation. 174cdf0e10cSrcweir 175cdf0e10cSrcweir @param nCommand 176cdf0e10cSrcweir a <type scope="com::sun::star::awt">Rectangle</type> which 177cdf0e10cSrcweir determine the output rectangle for all drawing operations 178cdf0e10cSrcweir 179cdf0e10cSrcweir @param nStyle 180cdf0e10cSrcweir reserved for future use. 181cdf0e10cSrcweir */ 182cdf0e10cSrcweir void paint( [in] ::com::sun::star::awt::XGraphics xGraphics, 183cdf0e10cSrcweir [in] ::com::sun::star::awt::Rectangle rOutputRectangle, 184cdf0e10cSrcweir [in] long nStyle ); 185cdf0e10cSrcweir 186cdf0e10cSrcweir /** is called by a status bar if the user clicked with mouse into the 187cdf0e10cSrcweir field of the corresponding control. 188cdf0e10cSrcweir 189*8f4dfc8eSAriel Constenla-Haile @param aPos 190*8f4dfc8eSAriel Constenla-Haile the current mouse position in pixel. 191*8f4dfc8eSAriel Constenla-Haile */ 192*8f4dfc8eSAriel Constenla-Haile void click( [in] ::com::sun::star::awt::Point aPos ); 193*8f4dfc8eSAriel Constenla-Haile 194cdf0e10cSrcweir /** is called by a status bar if the user double-clicked with mouse 195cdf0e10cSrcweir into the field of the corresponding control. 196*8f4dfc8eSAriel Constenla-Haile 197*8f4dfc8eSAriel Constenla-Haile @param aPos 198*8f4dfc8eSAriel Constenla-Haile the current mouse position in pixel. 199cdf0e10cSrcweir */ 200*8f4dfc8eSAriel Constenla-Haile void doubleClick( [in] ::com::sun::star::awt::Point aPos ); 201cdf0e10cSrcweir}; 202cdf0e10cSrcweir 203cdf0e10cSrcweir}; }; }; }; 204cdf0e10cSrcweir 205cdf0e10cSrcweir#endif 206