| 1 | /* |
|---|
| 2 | ----------------------------------------------------------------------------- |
|---|
| 3 | This source file is part of OGRE |
|---|
| 4 | (Object-oriented Graphics Rendering Engine) |
|---|
| 5 | For the latest info, see http://www.ogre3d.org/ |
|---|
| 6 | |
|---|
| 7 | Copyright (c) 2000-2013 Torus Knot Software Ltd |
|---|
| 8 | |
|---|
| 9 | Permission is hereby granted, free of charge, to any person obtaining a copy |
|---|
| 10 | of this software and associated documentation files (the "Software"), to deal |
|---|
| 11 | in the Software without restriction, including without limitation the rights |
|---|
| 12 | to use, copy, modify, merge, publish, distribute, sublicense, and/or sell |
|---|
| 13 | copies of the Software, and to permit persons to whom the Software is |
|---|
| 14 | furnished to do so, subject to the following conditions: |
|---|
| 15 | |
|---|
| 16 | The above copyright notice and this permission notice shall be included in |
|---|
| 17 | all copies or substantial portions of the Software. |
|---|
| 18 | |
|---|
| 19 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR |
|---|
| 20 | IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, |
|---|
| 21 | FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE |
|---|
| 22 | AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER |
|---|
| 23 | LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, |
|---|
| 24 | OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN |
|---|
| 25 | THE SOFTWARE. |
|---|
| 26 | ----------------------------------------------------------------------------- |
|---|
| 27 | */ |
|---|
| 28 | |
|---|
| 29 | #ifndef __OSXConfigDialog_H__ |
|---|
| 30 | #define __OSXConfigDialog_H__ |
|---|
| 31 | |
|---|
| 32 | #include "../OgrePrerequisites.h" |
|---|
| 33 | #include "../OgreRoot.h" |
|---|
| 34 | #include "../OgreRenderSystem.h" |
|---|
| 35 | #include "../OgreConfigOptionMap.h" |
|---|
| 36 | |
|---|
| 37 | #ifdef __OBJC__ |
|---|
| 38 | #import <Cocoa/Cocoa.h> |
|---|
| 39 | #import <AppKit/AppKit.h> |
|---|
| 40 | |
|---|
| 41 | #if defined(MAC_OS_X_VERSION_10_6) && MAC_OS_X_VERSION_MAX_ALLOWED >= MAC_OS_X_VERSION_10_6 |
|---|
| 42 | @interface OgreConfigWindowDelegate : NSObject <NSWindowDelegate, NSTableViewDelegate, NSTableViewDataSource> |
|---|
| 43 | #else |
|---|
| 44 | @interface OgreConfigWindowDelegate : NSObject |
|---|
| 45 | #endif |
|---|
| 46 | { |
|---|
| 47 | NSWindow *mConfigWindow; |
|---|
| 48 | NSImageView *mOgreLogo; |
|---|
| 49 | NSPopUpButton *mRenderSystemsPopUp; |
|---|
| 50 | NSPopUpButton *mOptionsPopUp; |
|---|
| 51 | NSTableView *mOptionsTable; |
|---|
| 52 | NSButton *mOkButton; |
|---|
| 53 | NSButton *mCancelButton; |
|---|
| 54 | NSTextField *mOptionLabel; |
|---|
| 55 | |
|---|
| 56 | NSDictionary *mOptions; |
|---|
| 57 | } |
|---|
| 58 | |
|---|
| 59 | - (void)cancelButtonPressed:(id)sender; |
|---|
| 60 | - (void)okButtonPressed:(id)sender; |
|---|
| 61 | - (void)popUpValueChanged:(id)sender; |
|---|
| 62 | |
|---|
| 63 | // Getters and setters |
|---|
| 64 | - (void)setOptions:(NSDictionary *)dict; |
|---|
| 65 | - (NSDictionary *)getOptions; |
|---|
| 66 | - (void)setRenderSystemsPopUp:(NSPopUpButton *)button; |
|---|
| 67 | - (NSPopUpButton *)getRenderSystemsPopUp; |
|---|
| 68 | - (void)setOgreLogo:(NSImageView *)image; |
|---|
| 69 | - (NSImageView *)getOgreLogo; |
|---|
| 70 | - (void)setConfigWindow:(NSWindow *)window; |
|---|
| 71 | - (NSWindow *)getConfigWindow; |
|---|
| 72 | - (void)setOptionsTable:(NSTableView *)table; |
|---|
| 73 | - (NSTableView *)getOptionsTable; |
|---|
| 74 | - (void)setOptionsPopUp:(NSPopUpButton *)button; |
|---|
| 75 | - (NSPopUpButton *)getOptionsPopUp; |
|---|
| 76 | |
|---|
| 77 | @end |
|---|
| 78 | #endif |
|---|
| 79 | |
|---|
| 80 | namespace Ogre |
|---|
| 81 | { |
|---|
| 82 | class _OgreExport ConfigDialog : public UtilityAlloc |
|---|
| 83 | { |
|---|
| 84 | public: |
|---|
| 85 | ConfigDialog(); |
|---|
| 86 | ~ConfigDialog(); |
|---|
| 87 | |
|---|
| 88 | void initialise(); |
|---|
| 89 | bool display(); |
|---|
| 90 | |
|---|
| 91 | protected: |
|---|
| 92 | #ifdef __OBJC__ |
|---|
| 93 | OgreConfigWindowDelegate *mWindowDelegate; |
|---|
| 94 | #endif |
|---|
| 95 | RenderSystem *mSelectedRenderSystem; |
|---|
| 96 | }; |
|---|
| 97 | } |
|---|
| 98 | |
|---|
| 99 | #endif // __OSX_CONFIG_DIALOG_H__ |
|---|