Menu and Popup
Introduction
This code demonstrates the usage of a menu as well as popup menus.
Please discuss this snippet within the Menu and Submenus thread.
Files
Menu_Demo.h
<cpp/>
- ifndef _Menu_h_
- define _Menu_h_
- include "CEGuiSample.h"
- include "CEGUI.h"
- include "CEGUIDefaultResourceProvider.h"
//------------------------------------------------------------------- // Offset to ensure that the mouse cursor will be within the popup menu // This will automatically close the popup menu whe the mouse is moved; // without the offset the mouse is not really within the popup menu. const float mouseOffset = 5.0f;
//------------------------------------------------------------------- // Specifies whether the popup menu will open to the right (default) or // to the left of the mouse. Opening to the left gives better results // with the Taharez scheme since the mouse cursor is not covering the // menu item. const bool mouseToLeftOfPopupMenu = false;
//------------------------------------------------------------------- class DemoSample : public CEGuiSample { public: //-------------------------------------------------------------------
bool initialiseSample()
{ using namespace CEGUI; try { // Retrieve the window manager WindowManager& winMgr = WindowManager::getSingleton();
// Load the TaharezLook scheme and set up the default mouse cursor and font SchemeManager::getSingleton().loadScheme("TaharezLook.scheme"); System::getSingleton().setDefaultMouseCursor("TaharezLook", "MouseArrow"); FontManager::getSingleton().createFont("Commonwealth-10.font");
// Set the GUI Sheet Window* sheet = winMgr.createWindow("DefaultWindow", "root_wnd"); System::getSingleton().setGUISheet(sheet);
// Load a layout Window* guiLayout = winMgr.loadWindowLayout("Menu.layout"); sheet->addChildWindow(guiLayout);
// Subscribe to the keyboard events to control the menu winMgr.getWindow("Root/FrameWindow")->subscribeEvent(CEGUI::Window::EventCharacterKey, CEGUI::Event::Subscriber(&DemoSample::onMenuKey, this));
// Configure the menu bar configureMenu( winMgr.getWindow("Root/FrameWindow/Menubar"), true );
// Hide the menubar of the popup menus winMgr.getWindow("Root/Popup")->hide();
// Configure the popup menus configureMenu( winMgr.getWindow("Root/Popup/FirstPopup"), false ); configureMenu( winMgr.getWindow("Root/Popup/SecondPopup"), false ); configureMenu( winMgr.getWindow("Root/Popup/FramePopup"), false ); configureMenu( winMgr.getWindow("Root/Popup/SheetPopup"), false );
// These "widgets" will display a contextual popup menu when right-clicked winMgr.getWindow("Root/FrameWindow/FirstPopup")->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&DemoSample::onPopupMenu, this)); winMgr.getWindow("Root/FrameWindow/SecondPopup")->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&DemoSample::onPopupMenu, this)); winMgr.getWindow("Root/FrameWindow")->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&DemoSample::onPopupMenu, this)); winMgr.getWindow("Root")->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&DemoSample::onPopupMenu, this)); } catch(Exception &e) { #if defined( __WIN32__ ) || defined( _WIN32 ) MessageBox(NULL, e.getMessage().c_str(), "Error initializing the demo", MB_OK | MB_ICONERROR | MB_TASKMODAL); #else std::cerr << "Error initializing the demo:" << e.getMessage().c_str() << "\n"; #endif }
return true; }
//-------------------------------------------------------------------
void cleanupSample(void)
{ }
//------------------------------------------------------------------- void configureMenu(CEGUI::Window* pParent, const bool& pMenubar) { // Recursively subscribe every menu item to the mouse enters/leaves/clicked events size_t childCount = pParent->getChildCount(); for(size_t childIdx = 0; childIdx < childCount; childIdx++) { if(pParent->getChildAtIdx(childIdx)->testClassName("MenuItem") || pParent->getChildAtIdx(childIdx)->testClassName("PopupMenu") ) { pParent->getChildAtIdx(childIdx)->subscribeEvent(CEGUI::MenuItem::EventMouseEnters, CEGUI::Event::Subscriber(&DemoSample::onMouseEntersMenuItem, this)); pParent->getChildAtIdx(childIdx)->subscribeEvent(CEGUI::MenuItem::EventMouseLeaves, pMenubar ? CEGUI::Event::Subscriber(&DemoSample::onMouseLeavesMenuItem, this) : CEGUI::Event::Subscriber(&DemoSample::onMouseLeavesPopupMenuItem, this)); if(pParent->getChildAtIdx(childIdx)->testClassName("MenuItem")) { pParent->getChildAtIdx(childIdx)->subscribeEvent(CEGUI::MenuItem::EventClicked, CEGUI::Event::Subscriber(&DemoSample::onMenuItemClicked, this)); } } configureMenu(pParent->getChildAtIdx(childIdx), pMenubar); } }
//------------------------------------------------------------------- bool onMouseEntersMenuItem(const CEGUI::EventArgs& e) { // Open or close a submenu const CEGUI::WindowEventArgs& we = static_cast<const CEGUI::WindowEventArgs&>(e); CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton(); CEGUI::MenuItem* menuItem = static_cast<CEGUI::MenuItem*>(we.window); if(menuItem) { setStatusText( menuItem->getTooltipText() ); if( menuItem->getPopupMenu() ) { if( menuItem->isOpened() ) { if(menuItem->testClassName("MenuItem")) { menuItem->closePopupMenu(); } } else { menuItem->openPopupMenu(); } } } else { setStatusText( "" ); } return true; }
//------------------------------------------------------------------- bool onMouseLeavesMenuItem(const CEGUI::EventArgs& e) { // Close a menu const CEGUI::WindowEventArgs& we = static_cast<const CEGUI::WindowEventArgs&>(e); CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton(); setStatusText( "" );
CEGUI::Window* menubar = we.window; while(menubar) { if( menubar->testClassName("Menubar") ) { // We found the root; a menu bar CEGUI::Vector2 childPosition = CEGUI::MouseCursor::getSingleton().getPosition(); CEGUI::Window* windowUnderTheCursor = menubar->getTargetChildAtPosition(childPosition); if(!windowUnderTheCursor) { CEGUI::MenuItem* popupMenu = static_cast<CEGUI::Menubar*>(menubar)->getPopupMenuItem(); if(popupMenu) { // This does not close sub-popup menus, only the current one popupMenu->closePopupMenu(); } } break; } menubar = menubar->getParent(); }
return true; }
//------------------------------------------------------------------- bool onMouseLeavesPopupMenuItem(const CEGUI::EventArgs& e) { // Close a popup menu const CEGUI::WindowEventArgs& we = static_cast<const CEGUI::WindowEventArgs&>(e); CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton(); setStatusText( "" );
CEGUI::Window* menubar = we.window; CEGUI::Window* popupParent; while(menubar) { popupParent = menubar->getParent(); if( popupParent && !popupParent->testClassName("Menubar") && !popupParent->testClassName("PopupMenu") && !popupParent->testClassName("MenuItem") ) { // We found the root; a popup menu CEGUI::Window* popupMenu = menubar; menubar = menubar->getParent(); CEGUI::Vector2 childPosition = CEGUI::MouseCursor::getSingleton().getPosition(); CEGUI::Window* windowUnderTheCursor = menubar->getTargetChildAtPosition(childPosition); if(!windowUnderTheCursor) { popupMenu->hide(); } break; } menubar = menubar->getParent(); }
return true; }
//------------------------------------------------------------------- bool onMenuItemClicked(const CEGUI::EventArgs& e) { const CEGUI::WindowEventArgs& we = static_cast<const CEGUI::WindowEventArgs&>(e); CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton(); setStatusText( "Clicked " + we.window->getName() ); return true; }
//------------------------------------------------------------------- bool onMenuKey(const CEGUI::EventArgs& e) { // Open or close a menu const CEGUI::KeyEventArgs& ke = static_cast<const CEGUI::KeyEventArgs&>(e); if(ke.sysKeys == CEGUI::Key::LeftAlt || ke.sysKeys == CEGUI::Key::RightAlt || ke.sysKeys == CEGUI::Key::Slash || ke.codepoint == 47) // Slash { CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton(); CEGUI::Menubar* menuBar = static_cast<CEGUI::Menubar*>(winMgr.getWindow("Root/FrameWindow/Menubar")); CEGUI::MenuItem* menuItem = menuBar->getPopupMenuItem(); if(menuItem) { // There's a menu opened, let's close it menuBar->changePopupMenuItem(0); } else { // The menu is closed, let's open the first menu menuItem = static_cast<CEGUI::MenuItem*>(winMgr.getWindow("Root/FrameWindow/Menubar/File")); menuBar->changePopupMenuItem(menuItem);
// Select the first item from this menu ??
}
}
return true; }
//------------------------------------------------------------------- bool onPopupMenu(const CEGUI::EventArgs& e) { // Open a context-sensitive menu const CEGUI::MouseEventArgs& me = static_cast<const CEGUI::MouseEventArgs&>(e); if(me.button == CEGUI::RightButton) { CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton(); CEGUI::PopupMenu* popupMenu = 0; if(me.window->getName().compare("Root/FrameWindow/FirstPopup") == 0) { popupMenu = static_cast<CEGUI::PopupMenu*>(winMgr.getWindow("Root/Popup/FirstPopup/AutoPopup")); } else if(me.window->getName().compare("Root/FrameWindow/SecondPopup") == 0) { popupMenu = static_cast<CEGUI::PopupMenu*>(winMgr.getWindow("Root/Popup/SecondPopup/AutoPopup")); } else if(me.window->getName().compare("Root/FrameWindow") == 0) { popupMenu = static_cast<CEGUI::PopupMenu*>(winMgr.getWindow("Root/Popup/FramePopup/AutoPopup")); } else if(me.window->getName().compare("Root") == 0) { popupMenu = static_cast<CEGUI::PopupMenu*>(winMgr.getWindow("Root/Popup/SheetPopup/AutoPopup")); }
if(popupMenu) { // Make the window the popup's parent me.window->addChildWindow(popupMenu);
// Position of the popup menu CEGUI::UVector2 popupPosition;
// Ensure the popup menu will be fully displayed horizontally on the screen float screenWidth = CEGUI::System::getSingleton().getRenderer()->getWidth(); float popupMenuWidth = popupMenu->getWidth().d_offset; if(popupMenuWidth < screenWidth) { // The x coordinate is either the mouse position or the right side of the // screen minus the width of the popup menu. This ensures that the popup // menu is fully displayed rather than clipped. float x; if(mouseToLeftOfPopupMenu) { x = me.position.d_x + popupMenuWidth > screenWidth ? screenWidth - popupMenuWidth : me.position.d_x - mouseOffset; } else { x = me.position.d_x < popupMenuWidth ? 0.0f : me.position.d_x - popupMenuWidth + mouseOffset; } popupPosition.d_x = cegui_absdim(CEGUI::CoordConverter::screenToWindowX(*me.window, x)); } else { // The popup menu is too wide to fit within the screen popupPosition.d_x = CEGUI::UDim(0.0f, 0.0f); }
// Ensure the popup menu will be fully displayed vertically on the screen float screenHeight = CEGUI::System::getSingleton().getRenderer()->getHeight(); float popupMenuHeight = popupMenu->getHeight().d_offset; if(popupMenuHeight < screenHeight) { // The y coordinate is either the mouse position or the bottom side of the // screen minus the height of the popup menu. This ensures that the popup // menu is fully displayed rather than clipped. float y = me.position.d_y + popupMenuHeight > screenHeight ? screenHeight - popupMenuHeight : me.position.d_y - mouseOffset; popupPosition.d_y = cegui_absdim(CEGUI::CoordConverter::screenToWindowY(*me.window, y)); } else { // The popup menu is too tall to fit within the screen popupPosition.d_y = CEGUI::UDim(0.0f, 0.0f); }
// Position the context menu popupMenu->setPosition(popupPosition);
// Show the popup menu popupMenu->show();
// Ensure it appears on top of the other widgets popupMenu->moveToFront(); } } return true; }
//------------------------------------------------------------------- void setStatusText(const CEGUI::String& pText) { CEGUI::WindowManager& winMgr = CEGUI::WindowManager::getSingleton(); winMgr.getWindow("Root/FrameWindow/Status")->setText(pText); }
private:
};
- endif // _Menu_h_
Main.cpp
<cpp/>
- if defined( __WIN32__ ) || defined( _WIN32 )
#define WIN32_LEAN_AND_MEAN #define NOMINMAX #include "windows.h"
- endif
- include "Menu_demo.h"
- if defined( __WIN32__ ) || defined( _WIN32 )
int APIENTRY WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine,int nCmdShow)
- else
int main(int argc, char *argv[])
- endif
{
DemoSample app; int i = app.run(); return i;
}
Menu.layout
<?xml version="1.0" encoding="UTF-8"?> <GUILayout > <Window Type="DefaultWindow" Name="Root" > <Property Name="InheritsAlpha" Value="False" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{1,0},{1,0}}" /> <Window Type="TaharezLook/FrameWindow" Name="Root/FrameWindow" > <Property Name="TitlebarFont" Value="Commonwealth-10" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="TitlebarEnabled" Value="True" /> <Property Name="UnifiedAreaRect" Value="{{0.00952756,0},{0.0104167,0},{0.51085,0},{0.585417,0}}" /> <Window Type="TaharezLook/Menubar" Name="Root/FrameWindow/Menubar" > <Property Name="ItemSpacing" Value="10" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,0},{0.09,0},{0.997727,0},{0.191014,0}}" /> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/File" > <Property Name="Text" Value="File" /> <Property Name="Tooltip" Value="Yes, primary menuitems can have a tooltip" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,7},{0,0},{0,30},{0,21}}" /> <Property Name="VerticalAlignment" Value="Centre" /> <Window Type="TaharezLook/PopupMenu" Name="Root/FrameWindow/Menubar/File/AutoPopup" > <Property Name="Visible" Value="False" /> <Property Name="FadeInTime" Value="0" /> <Property Name="FadeOutTime" Value="0" /> <Property Name="ItemSpacing" Value="2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="ClippedByParent" Value="False" /> <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,42},{0,118.525}}" /> <Property Name="AutoResizeEnabled" Value="True" /> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/File/New" > <Property Name="Text" Value="New" /> <Property Name="Tooltip" Value="Creates a new document." /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,2},{0,39},{0,23}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/File/Open" > <Property Name="Text" Value="Open..." /> <Property Name="Tooltip" Value="Opens an existing document." /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,25},{0,39},{0,46}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/File/Close" > <Property Name="Text" Value="Close" /> <Property Name="Tooltip" Value="Closes the active document." /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,48},{0,39},{0,69}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/File/Save" > <Property Name="Text" Value="Save" /> <Property Name="Tooltip" Value="Saves the active document." /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,71},{0,39},{0,92}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/File/Exit" > <Property Name="Text" Value="Exit" /> <Property Name="Tooltip" Value="Quits the application; prompts you to save documents." /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,94},{0,39},{0,115}}" /> </Window> </Window> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/Edit" > <Property Name="Text" Value="Edit" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,40},{0,0},{0,64},{0,21}}" /> <Property Name="VerticalAlignment" Value="Centre" /> <Window Type="TaharezLook/PopupMenu" Name="Root/FrameWindow/Menubar/Edit/AutoPopup" > <Property Name="Visible" Value="False" /> <Property Name="FadeInTime" Value="0" /> <Property Name="FadeOutTime" Value="0" /> <Property Name="ItemSpacing" Value="2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="ClippedByParent" Value="False" /> <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,65},{0,119.012}}" /> <Property Name="AutoResizeEnabled" Value="True" /> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/Edit/Cut" > <Property Name="Text" Value="Cut" /> <Property Name="Tooltip" Value="Cuts the selection and puts it on the Clipboard." /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,2},{0,62},{0,23}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/Edit/Copy" > <Property Name="Text" Value="Copy" /> <Property Name="Tooltip" Value="Copies the selection and puts it on the Clipboard." /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,25},{0,62},{0,46}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/Edit/Paste" > <Property Name="Text" Value="Paste" /> <Property Name="Tooltip" Value="Inserts the Clipboard contents." /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,48},{0,62},{0,69}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/Edit/Delete" > <Property Name="Text" Value="Delete" /> <Property Name="Tooltip" Value="Erases the selection." /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,71},{0,62},{0,92}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/Edit/SubMenu" > <Property Name="Text" Value="SubMenu" /> <Property Name="Tooltip" Value="This menuitem has a submenu" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,94},{0,62},{0,115}}" /> <Window Type="TaharezLook/PopupMenu" Name="Root/FrameWindow/Menubar/Edit/SubMenu/AutoPopup" > <Property Name="Visible" Value="False" /> <Property Name="FadeInTime" Value="0" /> <Property Name="FadeOutTime" Value="0" /> <Property Name="ItemSpacing" Value="2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="ClippedByParent" Value="False" /> <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,43},{0,49.2625}}" /> <Property Name="AutoResizeEnabled" Value="True" /> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/Edit/SubMenu/Item1" > <Property Name="Text" Value="Item 1" /> <Property Name="Tooltip" Value="This is sub-menu #1" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,2},{0,40},{0,23}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/Edit/SubMenu/Item2" > <Property Name="Text" Value="Item 2" /> <Property Name="Tooltip" Value="This is sub-menu #2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,25},{0,40},{0,46}}" /> </Window> </Window> </Window> </Window> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/Help" > <Property Name="Text" Value="Help" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,74},{0,0},{0,100},{0,21}}" /> <Property Name="VerticalAlignment" Value="Centre" /> <Window Type="TaharezLook/PopupMenu" Name="Root/FrameWindow/Menubar/Help/AutoPopup" > <Property Name="Visible" Value="False" /> <Property Name="FadeInTime" Value="0" /> <Property Name="FadeOutTime" Value="0" /> <Property Name="ItemSpacing" Value="2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="ClippedByParent" Value="False" /> <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,64},{0,48.8735}}" /> <Property Name="AutoResizeEnabled" Value="True" /> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/Help/Contents" > <Property Name="Text" Value="Contents..." /> <Property Name="Tooltip" Value="Displays the help contents." /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,2},{0,61},{0,23}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/FrameWindow/Menubar/Help/About" > <Property Name="Text" Value="About..." /> <Property Name="Tooltip" Value="Displays program information, version number, and copyright." /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,25},{0,61},{0,46}}" /> </Window> </Window> </Window> </Window> <Window Type="TaharezLook/StaticText" Name="Root/FrameWindow/Status" > <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0.031818,0},{0.873954,0},{0.972728,0},{0.967087,0}}" /> </Window> <Window Type="TaharezLook/StaticText" Name="Root/FrameWindow/FirstPopup" > <Property Name="Text" Value="First Popup" /> <Property Name="HorzFormatting" Value="HorzCentred" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0.131194,0},{0.701449,0},{0.431194,0},{0.795652,0}}" /> </Window> <Window Type="TaharezLook/StaticText" Name="Root/FrameWindow/SecondPopup" > <Property Name="Font" Value="Commonwealth-10" /> <Property Name="Text" Value="Second Popup" /> <Property Name="HorzFormatting" Value="HorzCentred" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0.572904,0},{0.701449,0},{0.872903,0},{0.795652,0}}" /> </Window> </Window> <Window Type="TaharezLook/Menubar" Name="Root/Popup" > <Property Name="ItemSpacing" Value="10" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0.565585,0},{0.07,0},{0.988716,0},{0.140833,0}}" /> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/FirstPopup" > <Property Name="Text" Value="First" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,7},{0,0},{0,37},{0,21}}" /> <Property Name="VerticalAlignment" Value="Centre" /> <Window Type="TaharezLook/PopupMenu" Name="Root/Popup/FirstPopup/AutoPopup" > <Property Name="FadeInTime" Value="0" /> <Property Name="FadeOutTime" Value="0" /> <Property Name="ItemSpacing" Value="2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="ClippedByParent" Value="False" /> <Property Name="UnifiedAreaRect" Value="{{0,0},{0,21},{0,45},{0,140.072}}" /> <Property Name="AutoResizeEnabled" Value="True" /> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/FirstPopup/First-1" > <Property Name="Text" Value="First-1" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,2},{0,42},{0,23}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/FirstPopup/First-2" > <Property Name="Text" Value="First-2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,25},{0,42},{0,46}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/FirstPopup/First-3" > <Property Name="Text" Value="First-3" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,48},{0,42},{0,69}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/FirstPopup/First-4" > <Property Name="Text" Value="First-4" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,71},{0,42},{0,92}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/FirstPopup/First-5" > <Property Name="Text" Value="First-5" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,94},{0,42},{0,115}}" /> </Window> </Window> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SecondPopup" > <Property Name="Text" Value="Second" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,47},{0,0},{0,87},{0,21}}" /> <Property Name="VerticalAlignment" Value="Centre" /> <Window Type="TaharezLook/PopupMenu" Name="Root/Popup/SecondPopup/AutoPopup" > <Property Name="Visible" Value="False" /> <Property Name="FadeInTime" Value="0" /> <Property Name="FadeOutTime" Value="0" /> <Property Name="ItemSpacing" Value="2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="ClippedByParent" Value="False" /> <Property Name="UnifiedAreaRect" Value="{{0,0},{0,21},{0,65},{0,139.557}}" /> <Property Name="AutoResizeEnabled" Value="True" /> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SecondPopup/Second-1" > <Property Name="Text" Value="Second-1" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,2},{0,62},{0,23}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SecondPopup/Second-2" > <Property Name="Text" Value="Second-2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,25},{0,62},{0,46}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SecondPopup/Second-3" > <Property Name="Text" Value="Second-3" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,48},{0,62},{0,69}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SecondPopup/Second-4" > <Property Name="Text" Value="Second-4" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,71},{0,62},{0,92}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SecondPopup/SubMenu" > <Property Name="Text" Value="SubMenu" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,94},{0,62},{0,115}}" /> <Window Type="TaharezLook/PopupMenu" Name="Root/Popup/SecondPopup/SubMenu/AutoPopup" > <Property Name="Visible" Value="False" /> <Property Name="FadeInTime" Value="0" /> <Property Name="FadeOutTime" Value="0" /> <Property Name="ItemSpacing" Value="2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="ClippedByParent" Value="False" /> <Property Name="UnifiedAreaRect" Value="{{0,0},{0,0},{0,58},{0,48.905}}" /> <Property Name="AutoResizeEnabled" Value="True" /> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SecondPopup/SubMenu/SubItem1" > <Property Name="Text" Value="SubItem1" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,2},{0,55},{0,23}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SecondPopup/SubMenu/SubItem2" > <Property Name="Text" Value="SubItem2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,25},{0,55},{0,46}}" /> </Window> </Window> </Window> </Window> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/FramePopup" > <Property Name="Text" Value="Frame" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,97},{0,0},{0,134},{0,21}}" /> <Property Name="VerticalAlignment" Value="Centre" /> <Window Type="TaharezLook/PopupMenu" Name="Root/Popup/FramePopup/AutoPopup" > <Property Name="Visible" Value="False" /> <Property Name="FadeInTime" Value="0" /> <Property Name="FadeOutTime" Value="0" /> <Property Name="ItemSpacing" Value="2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="ClippedByParent" Value="False" /> <Property Name="UnifiedAreaRect" Value="{{0,0},{0,21},{0,52},{0,70.5823}}" /> <Property Name="AutoResizeEnabled" Value="True" /> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/FramePopup/Frame-1" > <Property Name="Text" Value="Frame-1" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,2},{0,49},{0,23}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/FramePopup/Frame-2" > <Property Name="Text" Value="Frame-2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,25},{0,49},{0,46}}" /> </Window> </Window> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SheetPopup" > <Property Name="Text" Value="Sheet" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,144},{0,0},{0,177},{0,21}}" /> <Property Name="VerticalAlignment" Value="Centre" /> <Window Type="TaharezLook/PopupMenu" Name="Root/Popup/SheetPopup/AutoPopup" > <Property Name="Visible" Value="False" /> <Property Name="FadeInTime" Value="0" /> <Property Name="FadeOutTime" Value="0" /> <Property Name="ItemSpacing" Value="2" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="ClippedByParent" Value="False" /> <Property Name="UnifiedAreaRect" Value="{{0,0},{0,21},{0,35},{0,139.62}}" /> <Property Name="AutoResizeEnabled" Value="True" /> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SheetPopup/Allo" > <Property Name="Text" Value="Allo" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,2},{0,32},{0,23}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SheetPopup/Hello" > <Property Name="Text" Value="Hello" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,25},{0,32},{0,46}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SheetPopup/Hallo" > <Property Name="Text" Value="Hallo" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,48},{0,32},{0,69}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SheetPopup/Ciao" > <Property Name="Text" Value="Ciao" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,71},{0,32},{0,92}}" /> </Window> <Window Type="TaharezLook/MenuItem" Name="Root/Popup/SheetPopup/Hola" > <Property Name="Text" Value="Hola" /> <Property Name="UnifiedMaxSize" Value="{{1,0},{1,0}}" /> <Property Name="UnifiedAreaRect" Value="{{0,2},{0,94},{0,32},{0,115}}" /> </Window> </Window> </Window> </Window> </Window> </GUILayout>