Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
Alchemy Viewer
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Deploy
Releases
Package registry
Operate
Terraform modules
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Silent mode is enabled
All outbound communications are blocked.
Learn more
.
Show more breadcrumbs
Alchemy Viewer
Alchemy Viewer
Commits
34316644
Commit
34316644
authored
15 years ago
by
James Cook
Browse files
Options
Downloads
Patches
Plain Diff
Moved internal LLSideTrayTab class to .cpp file, de-inline param block constructor, not reviewed
parent
b8ce05ed
No related branches found
No related tags found
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
indra/newview/llsidetray.cpp
+67
-0
67 additions, 0 deletions
indra/newview/llsidetray.cpp
indra/newview/llsidetray.h
+2
-59
2 additions, 59 deletions
indra/newview/llsidetray.h
with
69 additions
and
59 deletions
indra/newview/llsidetray.cpp
+
67
−
0
View file @
34316644
...
...
@@ -111,6 +111,61 @@ bool LLSideTray::instanceCreated ()
return
sInstance
!=
0
;
}
//////////////////////////////////////////////////////////////////////////////
// LLSideTrayTab
// Represents a single tab in the side tray, only used by LLSideTray
//////////////////////////////////////////////////////////////////////////////
class
LLSideTrayTab
:
public
LLPanel
{
friend
class
LLUICtrlFactory
;
friend
class
LLSideTray
;
public:
struct
Params
:
public
LLInitParam
::
Block
<
Params
,
LLPanel
::
Params
>
{
// image name
Optional
<
std
::
string
>
image_path
;
Optional
<
std
::
string
>
tab_title
;
Optional
<
std
::
string
>
description
;
Params
()
:
image_path
(
"image"
),
tab_title
(
"tab_title"
,
"no title"
),
description
(
"description"
,
"no description"
)
{};
};
protected
:
LLSideTrayTab
(
const
Params
&
params
);
public
:
virtual
~
LLSideTrayTab
();
/*virtual*/
BOOL
postBuild
();
/*virtual*/
bool
addChild
(
LLView
*
view
,
S32
tab_group
);
void
arrange
(
S32
width
,
S32
height
);
void
reshape
(
S32
width
,
S32
height
,
BOOL
called_from_parent
=
TRUE
);
static
LLSideTrayTab
*
createInstance
();
const
std
::
string
&
getDescription
()
const
{
return
mDescription
;}
const
std
::
string
&
getTabTitle
()
const
{
return
mTabTitle
;}
void
draw
();
void
onOpen
(
const
LLSD
&
key
);
private
:
std
::
string
mTabTitle
;
std
::
string
mImagePath
;
std
::
string
mDescription
;
LLView
*
mMainPanel
;
};
LLSideTrayTab
::
LLSideTrayTab
(
const
Params
&
params
)
:
mMainPanel
(
0
)
{
mImagePath
=
params
.
image_path
;
...
...
@@ -221,6 +276,18 @@ LLSideTrayTab* LLSideTrayTab::createInstance ()
return
tab
;
}
//////////////////////////////////////////////////////////////////////////////
// LLSideTray
//////////////////////////////////////////////////////////////////////////////
LLSideTray
::
Params
::
Params
()
:
collapsed
(
"collapsed"
,
false
),
tab_btn_image_normal
(
"tab_btn_image"
,
"sidebar_tab_left.tga"
),
tab_btn_image_selected
(
"tab_btn_image_selected"
,
"button_enabled_selected_32x128.tga"
),
default_button_width
(
"tab_btn_width"
,
32
),
default_button_height
(
"tab_btn_height"
,
32
),
default_button_margin
(
"tab_btn_margin"
,
0
)
{}
//virtual
LLSideTray
::
LLSideTray
(
Params
&
params
)
...
...
This diff is collapsed.
Click to expand it.
indra/newview/llsidetray.h
+
2
−
59
View file @
34316644
...
...
@@ -36,59 +36,9 @@
#include
"llpanel.h"
#include
"string"
class
LLSideTray
;
class
LLSideTray
Tab
;
class
LLAccordionCtrl
;
class
LLSideTrayTab
:
public
LLPanel
{
friend
class
LLUICtrlFactory
;
friend
class
LLSideTray
;
public:
struct
Params
:
public
LLInitParam
::
Block
<
Params
,
LLPanel
::
Params
>
{
// image name
Optional
<
std
::
string
>
image_path
;
Optional
<
std
::
string
>
tab_title
;
Optional
<
std
::
string
>
description
;
Params
()
:
image_path
(
"image"
),
tab_title
(
"tab_title"
,
"no title"
),
description
(
"description"
,
"no description"
)
{};
};
protected
:
LLSideTrayTab
(
const
Params
&
params
);
public
:
virtual
~
LLSideTrayTab
();
/*virtual*/
BOOL
postBuild
();
/*virtual*/
bool
addChild
(
LLView
*
view
,
S32
tab_group
);
void
arrange
(
S32
width
,
S32
height
);
void
reshape
(
S32
width
,
S32
height
,
BOOL
called_from_parent
=
TRUE
);
static
LLSideTrayTab
*
createInstance
();
const
std
::
string
&
getDescription
()
const
{
return
mDescription
;}
const
std
::
string
&
getTabTitle
()
const
{
return
mTabTitle
;}
void
draw
();
void
onOpen
(
const
LLSD
&
key
);
private
:
std
::
string
mTabTitle
;
std
::
string
mImagePath
;
std
::
string
mDescription
;
LLView
*
mMainPanel
;
};
// added inheritance from LLDestroyClass<LLSideTray> to enable Side Tray perform necessary actions
// while disconnecting viewer in LLAppViewer::disconnectViewer().
// LLDestroyClassList::instance().fireCallbacks() calls destroyClass method. See EXT-245.
...
...
@@ -112,14 +62,7 @@ class LLSideTray : public LLPanel, private LLDestroyClass<LLSideTray>
Optional
<
S32
>
default_button_height
;
Optional
<
S32
>
default_button_margin
;
Params
()
:
collapsed
(
"collapsed"
,
false
),
tab_btn_image_normal
(
"tab_btn_image"
,
"sidebar_tab_left.tga"
),
tab_btn_image_selected
(
"tab_btn_image_selected"
,
"button_enabled_selected_32x128.tga"
),
default_button_width
(
"tab_btn_width"
,
32
),
default_button_height
(
"tab_btn_height"
,
32
),
default_button_margin
(
"tab_btn_margin"
,
0
)
{};
Params
();
};
static
LLSideTray
*
getInstance
();
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment