summaryrefslogtreecommitdiff
path: root/indra/newview/llpanellandmarks.h
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llpanellandmarks.h')
-rw-r--r--indra/newview/llpanellandmarks.h88
1 files changed, 67 insertions, 21 deletions
diff --git a/indra/newview/llpanellandmarks.h b/indra/newview/llpanellandmarks.h
index 47c9f7647c..c9217a4b2f 100644
--- a/indra/newview/llpanellandmarks.h
+++ b/indra/newview/llpanellandmarks.h
@@ -5,7 +5,7 @@
*
* $LicenseInfo:firstyear=2009&license=viewergpl$
*
- * Copyright (c) 2001-2009, Linden Research, Inc.
+ * Copyright (c) 2009, Linden Research, Inc.
*
* Second Life Viewer Source Code
* The source code in this file ("Source Code") is provided by Linden Lab
@@ -37,14 +37,16 @@
// newview
#include "llinventorymodel.h"
+#include "lllandmarklist.h"
#include "llpanelplacestab.h"
#include "llpanelpick.h"
#include "llremoteparcelrequest.h"
+class LLAccordionCtrlTab;
class LLFolderViewItem;
class LLMenuGL;
class LLInventoryPanel;
-class LLInventorySubTreePanel;
+class LLPlacesInventoryPanel;
class LLLandmarksPanel : public LLPanelPlacesTab, LLRemoteParcelInfoObserver
{
@@ -58,17 +60,45 @@ public:
/*virtual*/ void onTeleport();
/*virtual*/ void updateVerbs();
- void onSelectionChange(LLInventorySubTreePanel* inventory_list, const std::deque<LLFolderViewItem*> &items, BOOL user_action);
+ void onSelectionChange(LLPlacesInventoryPanel* inventory_list, const std::deque<LLFolderViewItem*> &items, BOOL user_action);
void onSelectorButtonClicked();
-
+ void setCurrentSelectedList(LLPlacesInventoryPanel* inventory_list)
+ {
+ mCurrentSelectedList = inventory_list;
+ }
+
+ /**
+ * Update filter ShowFolderState setting to show empty folder message
+ * if Landmarks inventory folder is empty.
+ */
+ void updateShowFolderState();
+
+ /**
+ * Selects item with "obj_id" in one of accordion tabs.
+ */
+ void setItemSelected(const LLUUID& obj_id, BOOL take_keyboard_focus);
+
+ LLPlacesInventoryPanel* getLibraryInventoryPanel() { return mLibraryInventoryPanel; }
+
protected:
/**
* @return true - if current selected panel is not null and selected item is a landmark
*/
bool isLandmarkSelected() const;
bool isReceivedFolderSelected() const;
- LLLandmark* getCurSelectedLandmark() const;
- LLFolderViewItem* getCurSelectedItem () const;
+ void doActionOnCurSelectedLandmark(LLLandmarkList::loaded_callback_t cb);
+ LLFolderViewItem* getCurSelectedItem() const;
+
+ /**
+ * Selects item with "obj_id" in "inventory_list" and scrolls accordion
+ * scrollbar to show the item.
+ * Returns pointer to the item if it is found in "inventory_list", otherwise NULL.
+ */
+ LLFolderViewItem* selectItemInAccordionTab(LLPlacesInventoryPanel* inventory_list,
+ const std::string& tab_name,
+ const LLUUID& obj_id,
+ BOOL take_keyboard_focus) const;
+
void updateSortOrder(LLInventoryPanel* panel, bool byDate);
//LLRemoteParcelInfoObserver interface
@@ -77,21 +107,20 @@ protected:
/*virtual*/ void setErrorStatus(U32 status, const std::string& reason);
private:
- void initFavoritesInventroyPanel();
- void initLandmarksInventroyPanel();
- void initMyInventroyPanel();
- void initLibraryInventroyPanel();
- void initLandmarksPanel(LLInventorySubTreePanel* inventory_list);
- void initAccordion(const std::string& accordion_tab_name, LLInventorySubTreePanel* inventory_list);
- void onAccordionExpandedCollapsed(const LLSD& param, LLInventorySubTreePanel* inventory_list);
- void deselectOtherThan(const LLInventorySubTreePanel* inventory_list);
+ void initFavoritesInventoryPanel();
+ void initLandmarksInventoryPanel();
+ void initMyInventoryPanel();
+ void initLibraryInventoryPanel();
+ void initLandmarksPanel(LLPlacesInventoryPanel* inventory_list);
+ LLAccordionCtrlTab* initAccordion(const std::string& accordion_tab_name, LLPlacesInventoryPanel* inventory_list, bool expand_tab);
+ void onAccordionExpandedCollapsed(const LLSD& param, LLPlacesInventoryPanel* inventory_list);
+ void deselectOtherThan(const LLPlacesInventoryPanel* inventory_list);
// List Commands Handlers
void initListCommandsHandlers();
void updateListCommands();
void onActionsButtonClick();
- void onAddLandmarkButtonClick() const;
- void onAddFolderButtonClick() const;
+ void showActionMenu(LLMenuGL* menu, std::string spawning_view_name);
void onTrashButtonClick() const;
void onAddAction(const LLSD& command_name) const;
void onClipboardAction(const LLSD& command_name) const;
@@ -114,17 +143,34 @@ private:
*/
bool handleDragAndDropToTrash(BOOL drop, EDragAndDropType cargo_type, EAcceptance* accept);
+ /**
+ * Landmark actions callbacks. Fire when a landmark is loaded from the list.
+ */
+ void doShowOnMap(LLLandmark* landmark);
+ void doProcessParcelInfo(LLLandmark* landmark,
+ LLFolderViewItem* cur_item,
+ LLInventoryItem* inv_item,
+ const LLParcelData& parcel_data);
+ void doCreatePick(LLLandmark* landmark);
+
private:
- LLInventorySubTreePanel* mFavoritesInventoryPanel;
- LLInventorySubTreePanel* mLandmarksInventoryPanel;
- LLInventorySubTreePanel* mMyInventoryPanel;
- LLInventorySubTreePanel* mLibraryInventoryPanel;
+ LLPlacesInventoryPanel* mFavoritesInventoryPanel;
+ LLPlacesInventoryPanel* mLandmarksInventoryPanel;
+ LLPlacesInventoryPanel* mMyInventoryPanel;
+ LLPlacesInventoryPanel* mLibraryInventoryPanel;
LLMenuGL* mGearLandmarkMenu;
LLMenuGL* mGearFolderMenu;
- LLInventorySubTreePanel* mCurrentSelectedList;
+ LLMenuGL* mMenuAdd;
+ LLPlacesInventoryPanel* mCurrentSelectedList;
+ LLInventoryObserver* mInventoryObserver;
LLPanel* mListCommands;
bool mSortByDate;
+
+ typedef std::vector<LLAccordionCtrlTab*> accordion_tabs_t;
+ accordion_tabs_t mAccordionTabs;
+
+ LLAccordionCtrlTab* mMyLandmarksAccordionTab;
};
#endif //LL_LLPANELLANDMARKS_H