diff options
author | Leslie Linden <leslie@lindenlab.com> | 2011-09-21 12:11:23 -0700 |
---|---|---|
committer | Leslie Linden <leslie@lindenlab.com> | 2011-09-21 12:11:23 -0700 |
commit | 305b65f6f600b81de9a78e1246d2a5353cc3189b (patch) | |
tree | 78ea15993f4862fadc956ace43918e3e50a6d127 /indra/newview/llfloatertoybox.cpp | |
parent | 8a846bd3747ac9192691b8b588bbae8d5e0de403 (diff) |
EXP-1205 PROGRESS -- As a User, I want a toybox which will contain all buttons that I can d&d into the toolbars
EXP-1210 FIX -- Implement new toybox floater window
EXP-1231 FIX -- Add menu option to toggle the toybox floater on and off
* Basic toybox floater implemented as its own class
* Toybox is available through "Me -> Toolbars..." menu option or ctrl-T shortcut
* Toolbars now have "side" type rather than simple orientation, as well as button
state for "icons only" or "icons with text".
Reviewed by Richard
Diffstat (limited to 'indra/newview/llfloatertoybox.cpp')
-rw-r--r-- | indra/newview/llfloatertoybox.cpp | 103 |
1 files changed, 103 insertions, 0 deletions
diff --git a/indra/newview/llfloatertoybox.cpp b/indra/newview/llfloatertoybox.cpp new file mode 100644 index 0000000000..b4fb2e45ab --- /dev/null +++ b/indra/newview/llfloatertoybox.cpp @@ -0,0 +1,103 @@ +/** + * @file llfloatertoybox.cpp + * @brief The toybox for flexibilizing the UI. + * + * $LicenseInfo:firstyear=2002&license=viewerlgpl$ + * Second Life Viewer Source Code + * Copyright (C) 2011, Linden Research, Inc. + * + * This library is free software; you can redistribute it and/or + * modify it under the terms of the GNU Lesser General Public + * License as published by the Free Software Foundation; + * version 2.1 of the License only. + * + * This library is distributed in the hope that it will be useful, + * but WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * Lesser General Public License for more details. + * + * You should have received a copy of the GNU Lesser General Public + * License along with this library; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + * Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA + * $/LicenseInfo$ + */ + +#include "llviewerprecompiledheaders.h" + +#include "llfloatertoybox.h" + +#include "llbutton.h" +#include "llpanel.h" + + +LLFloaterToybox::LLFloaterToybox(const LLSD& key) + : LLFloater(key) + , mBtnRestoreDefaults(NULL) +{ + mCommitCallbackRegistrar.add("Toybox.RestoreDefaults", boost::bind(&LLFloaterToybox::onBtnRestoreDefaults, this)); +} + +LLFloaterToybox::~LLFloaterToybox() +{ +} + +BOOL LLFloaterToybox::postBuild() +{ + center(); + + mBtnRestoreDefaults = getChild<LLButton>("btn_restore_defaults"); + + // + // Create Buttons + // +/* + LLToyboxButtons::load(); + + for (size_t i = 0; i < LLToyboxButtons::buttonCount(); i++) + { + LLToyboxButton * button = LLToyboxButtons::get(i); + + // Panel opacity depends on whether or not button position is established + LLPanel * buttonPanel = createPanelForButton(button); + + mToolBar->add(buttonPanel); + } +*/ + + return TRUE; +} + +void LLFloaterToybox::onOpen(const LLSD& key) +{ + +} + +BOOL LLFloaterToybox::canClose() +{ + return TRUE; +} + +void LLFloaterToybox::onClose(bool app_quitting) +{ + +} + +void LLFloaterToybox::draw() +{ + LLFloater::draw(); +} + +void LLFloaterToybox::onFocusReceived() +{ + +} + +void LLFloaterToybox::onBtnRestoreDefaults() +{ + +} + + +// eof |