00001 /* 00002 * @(#)JQMenuBarBridge.h 0.2.0 / 2007-11-07 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 JQMENUBARBRIDGE_H 00010 #define JQMENUBARBRIDGE_H 00011 00012 #include "JavaQxQSwing.h" 00013 00014 #include "JQContainerBridge.h" 00015 00016 /*^**************************************************************************^*/ 00017 /*- JQMenuBarBridge Class. -*/ 00018 /*^**************************************************************************^*/ 00019 00026 class JAVAQX_EXPORT JQMenuBarBridge : public JQContainerBridge 00027 { 00028 Q_OBJECT 00029 protected: 00030 JQMenuBarBridge(JNIEnv *env, jobject obj); 00031 public slots: // native calls 00032 void insertChild(JNIEnv *env, jlong childBridge, jint index); 00033 void removeChild(JNIEnv *env, jlong childBridge); 00034 public: // native calls 00035 static jlong newInstance(JNIEnv *env, jobject obj); 00036 public: 00037 inline QMenuBar *qMenuBar() const; 00038 }; 00039 00040 /*^**************************************************************************^*/ 00041 /*- JQMenuBarBridge :: Public Inline Member Function. -*/ 00042 /*^**************************************************************************^*/ 00043 00049 inline QMenuBar *JQMenuBarBridge::qMenuBar() const 00050 { 00051 return static_cast<QMenuBar *>(qObject()); 00052 } 00053 00054 /*^**************************************************************************^*/ 00055 /*- Macro Definitions. -*/ 00056 /*^**************************************************************************^*/ 00057 00058 #define jqMenuBarCast(bridge) (reinterpret_cast<JQMenuBarBridge *>(bridge)) 00059 #define jqMenuBarBridge jqMenuBarCast(bridge) 00060 00061 #endif //JQMENUBARBRIDGE_H 00062 00063 /*^***************************************************************************** 00064 File History: 00065 00066 - 2007-11-07 20:56:40 Slobodan 00067 Initial version 00068 00069 *****************************************************************************^*/