summaryrefslogtreecommitdiff
path: root/indra/llui/llpanel.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui/llpanel.h')
-rw-r--r--indra/llui/llpanel.h29
1 files changed, 17 insertions, 12 deletions
diff --git a/indra/llui/llpanel.h b/indra/llui/llpanel.h
index fc40cd77eb..552a621a8e 100644
--- a/indra/llui/llpanel.h
+++ b/indra/llui/llpanel.h
@@ -37,8 +37,6 @@
#include "llcallbackmap.h"
#include "lluictrl.h"
-#include "llbutton.h"
-#include "lllineeditor.h"
#include "llviewborder.h"
#include "lluistring.h"
#include "v4color.h"
@@ -49,6 +47,7 @@ const S32 LLPANEL_BORDER_WIDTH = 1;
const BOOL BORDER_YES = TRUE;
const BOOL BORDER_NO = FALSE;
+class LLButton;
/*
* General purpose concrete view base class.
@@ -62,11 +61,11 @@ public:
struct LocalizedString : public LLInitParam::Block<LocalizedString>
{
Mandatory<std::string> name;
- Mandatory<std::string> text;
+ Mandatory<std::string> value;
LocalizedString()
: name("name"),
- text("value")
+ value("value")
{}
};
@@ -89,10 +88,15 @@ public:
Optional<std::string> class_name;
Multiple<LocalizedString> strings;
-
+
+ Optional<CommitCallbackParam> visible_callback;
+
Params();
};
+ // valid children for LLPanel are stored in this registry
+ typedef LLDefaultChildRegistry child_registry_t;
+
protected:
friend class LLUICtrlFactory;
// RN: for some reason you can't just use LLUICtrlFactory::getDefaultParams as a default argument in VC8
@@ -109,6 +113,7 @@ public:
/*virtual*/ BOOL isPanel() const;
/*virtual*/ void draw();
/*virtual*/ BOOL handleKeyHere( KEY key, MASK mask );
+ /*virtual*/ void handleVisibilityChange ( BOOL new_visibility );
// Override to set not found list:
/*virtual*/ LLView* getChildView(const std::string& name, BOOL recurse = TRUE, BOOL create_if_missing = TRUE) const;
@@ -165,7 +170,6 @@ public:
void initFromParams(const Params& p);
BOOL initPanelXML(LLXMLNodePtr node, LLView *parent, LLXMLNodePtr output_node = NULL);
- /*virtual*/ const widget_registry_t& getChildRegistry() const;
bool hasString(const std::string& name);
std::string getString(const std::string& name, const LLStringUtil::format_map_t& args) const;
@@ -213,10 +217,6 @@ public:
BOOL childSetLabelArg(const std::string& id, const std::string& key, const LLStringExplicit& text);
BOOL childSetToolTipArg(const std::string& id, const std::string& key, const LLStringExplicit& text);
- // LLSlider / LLMultiSlider / LLSpinCtrl
- void childSetMinValue(const std::string& id, LLSD min_value);
- void childSetMaxValue(const std::string& id, LLSD max_value);
-
// LLTabContainer
void childShowTab(const std::string& id, const std::string& tabname, bool visible = true);
LLPanel *childGetVisibleTab(const std::string& id) const;
@@ -235,7 +235,10 @@ public:
// LLButton
void childSetAction(const std::string& id, boost::function<void(void*)> function, void* value = NULL);
- void childSetActionTextbox(const std::string& id, void(*function)(void*), void* value = NULL);
+
+ // LLTextBox
+ void childSetActionTextbox(const std::string& id, boost::function<void(void*)> function, void* value = NULL);
+
void childSetControlName(const std::string& id, const std::string& control_name);
// Error reporting
@@ -254,6 +257,8 @@ protected:
CommitCallbackRegistry::ScopedRegistrar mCommitCallbackRegistrar;
EnableCallbackRegistry::ScopedRegistrar mEnableCallbackRegistrar;
+ commit_signal_t mVisibleSignal; // Called when visibilit changes, passes new visibility as LLSD()
+
private:
// Unified error reporting for the child* functions
typedef std::set<std::string> expected_members_list_t;
@@ -273,7 +278,7 @@ private:
ui_string_map_t mUIStrings;
std::string mRequirementsError;
-
+
}; // end class LLPanel
#endif