WhatsThisManagerBridge.h

00001 /*
00002  * @(#)WhatsThisManagerBridge.h  0.2.0 / 2007-12-01
00003  *
00004  * Copyright (c) 2007, ETF and contributors. All rights reserved.
00005  *
00006  * This software is licensed under the LGPL, version 2.1, license.
00007  * A copy of the license is included in the file LICENSE-LGPL.txt.
00008  */
00009 #ifndef WHATSTHISMANAGERBRIDGE_H
00010 #define WHATSTHISMANAGERBRIDGE_H
00011 
00012 #include "JavaQxQSwing.h"
00013 
00014 /*^**************************************************************************^*/
00015 /*- WhatsThisManagerBridge Class.                                            -*/
00016 /*^**************************************************************************^*/
00017 
00024 class JAVAQX_EXPORT WhatsThisManagerBridge
00025 {
00026 public: // native calls
00027   static void setEnabled(JNIEnv *env, jclass cls, jboolean enabled);
00028   static void showText(JNIEnv *env, jclass cls, jstring text, jint x, jint y,
00029                        jlong componentBridge);
00030   static void hideText(JNIEnv *env, jclass cls);
00031   static jboolean isInWhatsThisMode(JNIEnv *env, jclass cls);
00032   static void enterWhatsThisMode(JNIEnv *env, jclass cls);
00033   static void exitWhatsThisMode(JNIEnv *env, jclass cls);
00034 public:
00035   inline static bool whatsThisEnabled();
00036 private:
00037   static bool sm_enabled;
00038 };
00039 
00040 /*^**************************************************************************^*/
00041 /*- WhatsThisManagerBridge :: Public Static Inline Member Function.          -*/
00042 /*^**************************************************************************^*/
00043 
00049 inline bool WhatsThisManagerBridge::whatsThisEnabled()
00050 {
00051   return sm_enabled;
00052 }
00053 
00054 /*^**************************************************************************^*/
00055 /*- Macro Definition.                                                        -*/
00056 /*^**************************************************************************^*/
00057 
00058 #define whatsThisManagerBridge \
00059     (reinterpret_cast<WhatsThisManagerBridge *>(bridge))
00060 
00061 #endif //WHATSTHISMANAGERBRIDGE_H
00062 
00063 /*^*****************************************************************************
00064   File History:
00065 
00066  - 2007-12-01 17:32:37 Slobodan
00067    Initial version
00068 
00069 *****************************************************************************^*/

Copyright © 2007 ETF and contributors. All Rights Reserved.