summaryrefslogtreecommitdiff
path: root/indra/llui
diff options
context:
space:
mode:
Diffstat (limited to 'indra/llui')
-rw-r--r--indra/llui/llcombobox.cpp7
-rw-r--r--indra/llui/llcombobox.h4
-rw-r--r--indra/llui/lldockablefloater.cpp23
-rw-r--r--indra/llui/lldockablefloater.h1
-rw-r--r--indra/llui/lldockcontrol.cpp5
-rw-r--r--indra/llui/lldockcontrol.h1
-rw-r--r--indra/llui/lllayoutstack.cpp13
-rw-r--r--indra/llui/lllayoutstack.h8
8 files changed, 40 insertions, 22 deletions
diff --git a/indra/llui/llcombobox.cpp b/indra/llui/llcombobox.cpp
index 803978bfa2..f29e8785eb 100644
--- a/indra/llui/llcombobox.cpp
+++ b/indra/llui/llcombobox.cpp
@@ -102,7 +102,6 @@ LLComboBox::LLComboBox(const LLComboBox::Params& p)
mMaxChars(p.max_chars),
mPrearrangeCallback(p.prearrange_callback()),
mTextEntryCallback(p.text_entry_callback()),
- mSelectionCallback(p.selection_callback()),
mListPosition(p.list_position),
mLastSelectedIndex(-1)
{
@@ -721,12 +720,6 @@ void LLComboBox::onItemSelected(const LLSD& data)
// commit does the reverse, asserting the value in the list
onCommit();
-
- // call the callback if it exists
- if(mSelectionCallback)
- {
- mSelectionCallback(this, data);
- }
}
BOOL LLComboBox::handleToolTip(S32 x, S32 y, MASK mask)
diff --git a/indra/llui/llcombobox.h b/indra/llui/llcombobox.h
index 11acdb9b8f..4f27588467 100644
--- a/indra/llui/llcombobox.h
+++ b/indra/llui/llcombobox.h
@@ -82,8 +82,7 @@ public:
allow_new_values;
Optional<S32> max_chars;
Optional<commit_callback_t> prearrange_callback,
- text_entry_callback,
- selection_callback;
+ text_entry_callback;
Optional<EPreferredPosition, PreferredPositionValues> list_position;
@@ -200,7 +199,6 @@ public:
void setPrearrangeCallback( commit_callback_t cb ) { mPrearrangeCallback = cb; }
void setTextEntryCallback( commit_callback_t cb ) { mTextEntryCallback = cb; }
- void setSelectionCallback( commit_callback_t cb ) { mSelectionCallback = cb; }
void setButtonVisible(BOOL visible);
diff --git a/indra/llui/lldockablefloater.cpp b/indra/llui/lldockablefloater.cpp
index c3dd4ae647..9a2f2ab4d3 100644
--- a/indra/llui/lldockablefloater.cpp
+++ b/indra/llui/lldockablefloater.cpp
@@ -136,21 +136,10 @@ void LLDockableFloater::setVisible(BOOL visible)
void LLDockableFloater::setMinimized(BOOL minimize)
{
- if(minimize && isDocked())
+ if(minimize)
{
setVisible(FALSE);
}
-
- if (minimize)
- {
- setCanDock(false);
- }
- else if (!minimize && mDockControl.get() != NULL && mDockControl.get()->isDockVisible())
- {
- setCanDock(true);
- }
-
- LLFloater::setMinimized(minimize);
}
LLView * LLDockableFloater::getDockWidget()
@@ -217,6 +206,16 @@ void LLDockableFloater::draw()
LLFloater::draw();
}
+void LLDockableFloater::reshape(S32 width, S32 height, BOOL called_from_parent)
+{
+ if (isDocked())
+ {
+ setDocked(false);
+ }
+
+ LLFloater::reshape(width, height, called_from_parent);
+}
+
void LLDockableFloater::setDockControl(LLDockControl* dockControl)
{
mDockControl.reset(dockControl);
diff --git a/indra/llui/lldockablefloater.h b/indra/llui/lldockablefloater.h
index 46491d8a29..e5f94dca91 100644
--- a/indra/llui/lldockablefloater.h
+++ b/indra/llui/lldockablefloater.h
@@ -65,6 +65,7 @@ public:
/* virtula */BOOL postBuild();
/* virtual */void setDocked(bool docked, bool pop_on_undock = true);
/* virtual */void draw();
+ /* virtual */void reshape(S32 width, S32 height, BOOL called_from_parent = TRUE);
/**
* If descendant class overrides setVisible() then it must still invoke its
diff --git a/indra/llui/lldockcontrol.cpp b/indra/llui/lldockcontrol.cpp
index 045505af5b..456a2925a3 100644
--- a/indra/llui/lldockcontrol.cpp
+++ b/indra/llui/lldockcontrol.cpp
@@ -266,6 +266,11 @@ void LLDockControl::off()
mEnabled = false;
}
+void LLDockControl::forceRecalculatePosition()
+{
+ mRecalculateDocablePosition = true;
+}
+
void LLDockControl::drawToungue()
{
if (mEnabled)
diff --git a/indra/llui/lldockcontrol.h b/indra/llui/lldockcontrol.h
index eaedb4c307..30a45bedc7 100644
--- a/indra/llui/lldockcontrol.h
+++ b/indra/llui/lldockcontrol.h
@@ -63,6 +63,7 @@ public:
public:
void on();
void off();
+ void forceRecalculatePosition();
void setDock(LLView* dockWidget);
LLView* getDock()
{
diff --git a/indra/llui/lllayoutstack.cpp b/indra/llui/lllayoutstack.cpp
index 14a6ddb7e0..1fb618adee 100644
--- a/indra/llui/lllayoutstack.cpp
+++ b/indra/llui/lllayoutstack.cpp
@@ -413,6 +413,19 @@ void LLLayoutStack::updatePanelAutoResize(const std::string& panel_name, BOOL au
}
}
+bool LLLayoutStack::getPanelMinSize(const std::string& panel_name, S32* min_widthp, S32* min_heightp)
+{
+ LayoutPanel* panel = findEmbeddedPanelByName(panel_name);
+
+ if (panel)
+ {
+ if (min_widthp) *min_widthp = panel->mMinWidth;
+ if (min_heightp) *min_heightp = panel->mMinHeight;
+ }
+
+ return NULL != panel;
+}
+
static LLFastTimer::DeclareTimer FTM_UPDATE_LAYOUT("Update LayoutStacks");
void LLLayoutStack::updateLayout(BOOL force_resize)
{
diff --git a/indra/llui/lllayoutstack.h b/indra/llui/lllayoutstack.h
index 9cbcb285dc..abd5436018 100644
--- a/indra/llui/lllayoutstack.h
+++ b/indra/llui/lllayoutstack.h
@@ -82,6 +82,14 @@ public:
void updatePanelAutoResize(const std::string& panel_name, BOOL auto_resize);
+ /**
+ * Gets minimal width and/or height of the specified by name panel.
+ *
+ * If it is necessary to get only the one dimension pass NULL for another one.
+ * @returns true if specified by panel_name internal panel exists, false otherwise.
+ */
+ bool getPanelMinSize(const std::string& panel_name, S32* min_widthp, S32* min_heightp);
+
void updateLayout(BOOL force_resize = FALSE);
static void updateClass();