summaryrefslogtreecommitdiff
path: root/indra/newview/llpanelpick.h
blob: bdc7ef1f3e72fcdb4f534326be5abd3d3fc3c389 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
/** 
 * @file llpanelpick.h
 * @brief LLPanelPick class definition
 *
 * Copyright (c) 2004-$CurrentYear$, Linden Research, Inc.
 * $License$
 */

// Display of a "Top Pick" used both for the global top picks in the 
// Find directory, and also for each individual user's picks in their
// profile.

#ifndef LL_LLPANELPICK_H
#define LL_LLPANELPICK_H

#include "llpanel.h"
#include "v3dmath.h"
#include "lluuid.h"

class LLButton;
class LLCheckBoxCtrl;
class LLIconCtrl;
class LLLineEditor;
class LLTextBox;
class LLTextEditor;
class LLTextureCtrl;
class LLUICtrl;
class LLMessageSystem;

class LLPanelPick : public LLPanel
{
public:
    LLPanelPick(BOOL top_pick);
    /*virtual*/ ~LLPanelPick();

	void reset();

    /*virtual*/ BOOL postBuild();

    /*virtual*/ void draw();

	void refresh();

	// Setup a new pick, including creating an id, giving a sane
	// initial position, etc.
	void initNewPick();

	void setPickID(const LLUUID& id);

	// Schedules the panel to request data
	// from the server next time it is drawn.
	void markForServerRequest();

	std::string getPickName();
	const LLUUID& getPickID() const { return mPickID; }

    void sendPickInfoRequest();
	void sendPickInfoUpdate();

    static void processPickInfoReply(LLMessageSystem* msg, void**);

protected:
    static void onClickTeleport(void* data);
    static void onClickMap(void* data);
    //static void onClickLandmark(void* data);
    static void onClickSet(void* data);

	static void onCommitAny(LLUICtrl* ctrl, void* data);

protected:
	BOOL mTopPick;
    LLUUID mPickID;
	LLUUID mCreatorID;
	LLUUID mParcelID;

	// Data will be requested on first draw
	BOOL mDataRequested;
	BOOL mDataReceived;

	LLString mSimName;
    LLVector3d mPosGlobal;

    LLTextureCtrl*	mSnapshotCtrl;
    LLLineEditor*	mNameEditor;
    LLTextEditor*	mDescEditor;
    LLLineEditor*	mLocationEditor;

    LLButton*    mTeleportBtn;
    LLButton*    mMapBtn;

    LLTextBox*    mSortOrderText;
    LLLineEditor* mSortOrderEditor;
    LLCheckBoxCtrl* mEnabledCheck;
    LLButton*    mSetBtn;

    static LLLinkedList<LLPanelPick> sAllPanels;
};

#endif // LL_LLPANELPICK_H