aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linden/indra/newview/llpanelclassified.h
diff options
context:
space:
mode:
authorJacek Antonelli2008-08-15 23:44:46 -0500
committerJacek Antonelli2008-08-15 23:44:46 -0500
commit38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4 (patch)
treeadca584755d22ca041a2dbfc35d4eca01f70b32c /linden/indra/newview/llpanelclassified.h
parentREADME.txt (diff)
downloadmeta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.zip
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.gz
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.bz2
meta-impy-38d6d37f2d982fa959e9e8a4a3f7e1ccfad7b5d4.tar.xz
Second Life viewer sources 1.13.2.12
Diffstat (limited to '')
-rw-r--r--linden/indra/newview/llpanelclassified.h170
1 files changed, 170 insertions, 0 deletions
diff --git a/linden/indra/newview/llpanelclassified.h b/linden/indra/newview/llpanelclassified.h
new file mode 100644
index 0000000..ee70cae
--- /dev/null
+++ b/linden/indra/newview/llpanelclassified.h
@@ -0,0 +1,170 @@
1/**
2 * @file llpanelclassified.h
3 * @brief LLPanelClassified class definition
4 *
5 * Copyright (c) 2005-2007, Linden Research, Inc.
6 *
7 * The source code in this file ("Source Code") is provided by Linden Lab
8 * to you under the terms of the GNU General Public License, version 2.0
9 * ("GPL"), unless you have obtained a separate licensing agreement
10 * ("Other License"), formally executed by you and Linden Lab. Terms of
11 * the GPL can be found in doc/GPL-license.txt in this distribution, or
12 * online at http://secondlife.com/developers/opensource/gplv2
13 *
14 * There are special exceptions to the terms and conditions of the GPL as
15 * it is applied to this Source Code. View the full text of the exception
16 * in the file doc/FLOSS-exception.txt in this software distribution, or
17 * online at http://secondlife.com/developers/opensource/flossexception
18 *
19 * By copying, modifying or distributing this software, you acknowledge
20 * that you have read and understood your obligations described above,
21 * and agree to abide by those obligations.
22 *
23 * ALL LINDEN LAB SOURCE CODE IS PROVIDED "AS IS." LINDEN LAB MAKES NO
24 * WARRANTIES, EXPRESS, IMPLIED OR OTHERWISE, REGARDING ITS ACCURACY,
25 * COMPLETENESS OR PERFORMANCE.
26 */
27
28// Display of a classified used both for the global view in the
29// Find directory, and also for each individual user's classified in their
30// profile.
31
32#ifndef LL_LLPANELCLASSIFIED_H
33#define LL_LLPANELCLASSIFIED_H
34
35#include "llpanel.h"
36#include "llclassifiedinfo.h"
37#include "v3dmath.h"
38#include "lluuid.h"
39#include "llfloater.h"
40//#include "llrect.h"
41
42class LLButton;
43class LLCheckBoxCtrl;
44class LLComboBox;
45class LLIconCtrl;
46class LLLineEditor;
47class LLTextBox;
48class LLTextEditor;
49class LLTextureCtrl;
50class LLUICtrl;
51class LLMessageSystem;
52
53class LLPanelClassified : public LLPanel
54{
55public:
56 LLPanelClassified(BOOL in_finder);
57 /*virtual*/ ~LLPanelClassified();
58
59 void reset();
60
61 /*virtual*/ BOOL postBuild();
62
63 /*virtual*/ void draw();
64
65 void refresh();
66
67 void apply();
68
69 // Setup a new classified, including creating an id, giving a sane
70 // initial position, etc.
71 void initNewClassified();
72
73 void setClassifiedID(const LLUUID& id);
74 static void setClickThrough(const LLUUID& classified_id,
75 S32 teleport, S32 map, S32 profile);
76
77 // check that the title is valid (E.G. starts with a number or letter)
78 BOOL titleIsValid();
79
80 // Schedules the panel to request data
81 // from the server next time it is drawn.
82 void markForServerRequest();
83
84 std::string getClassifiedName();
85 const LLUUID& getClassifiedID() const { return mClassifiedID; }
86
87 void sendClassifiedInfoRequest();
88 void sendClassifiedInfoUpdate();
89
90 static void processClassifiedInfoReply(LLMessageSystem* msg, void**);
91
92 static void callbackGotPriceForListing(S32 option, LLString text, void* data);
93 static void callbackConfirmPublish(S32 option, void* data);
94
95protected:
96 static void onClickUpdate(void* data);
97 static void onClickTeleport(void* data);
98 static void onClickMap(void* data);
99 static void onClickProfile(void* data);
100 static void onClickSet(void* data);
101
102 static void onFocusReceived(LLUICtrl* ctrl, void* data);
103 static void onCommitAny(LLUICtrl* ctrl, void* data);
104
105 void sendClassifiedClickMessage(const char* type);
106
107protected:
108 BOOL mInFinder;
109 LLUUID mClassifiedID;
110 LLUUID mRequestedID;
111 LLUUID mCreatorID;
112 LLUUID mParcelID;
113 S32 mPriceForListing;
114
115 // Data will be requested on first draw
116 BOOL mDataRequested;
117 BOOL mEnableCommit;
118
119 // For avatar panel classifieds only, has the user been charged
120 // yet for this classified? That is, have they saved once?
121 BOOL mPaidFor;
122
123 LLString mSimName;
124 LLVector3d mPosGlobal;
125
126 LLTextureCtrl* mSnapshotCtrl;
127 LLLineEditor* mNameEditor;
128 LLLineEditor* mDateEditor;
129 LLTextEditor* mDescEditor;
130 LLLineEditor* mLocationEditor;
131 LLComboBox* mCategoryCombo;
132
133 LLButton* mUpdateBtn;
134 LLButton* mTeleportBtn;
135 LLButton* mMapBtn;
136 LLButton* mProfileBtn;
137
138 LLTextBox* mInfoText;
139 LLCheckBoxCtrl* mMatureCheck;
140 LLCheckBoxCtrl* mAutoRenewCheck;
141 LLButton* mSetBtn;
142 LLTextBox* mClickThroughText;
143
144 LLRect mSnapshotSize;
145 static LLLinkedList<LLPanelClassified> sAllPanels;
146};
147
148
149class LLFloaterPriceForListing
150: public LLFloater
151{
152public:
153 LLFloaterPriceForListing();
154 virtual ~LLFloaterPriceForListing();
155 virtual BOOL postBuild();
156
157 static void show( void (*callback)(S32 option, LLString value, void* userdata), void* userdata );
158
159private:
160 static void onClickSetPrice(void*);
161 static void onClickCancel(void*);
162 static void buttonCore(S32 button, void* data);
163
164private:
165 void (*mCallback)(S32 option, LLString, void*);
166 void* mUserData;
167};
168
169
170#endif // LL_LLPANELCLASSIFIED_H