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
7eabd5e0
Commit
7eabd5e0
authored
3 years ago
by
Rye Mutt
Browse files
Options
Downloads
Patches
Plain Diff
Add move support to LLUIString
parent
cb9b7644
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
indra/llui/llbutton.cpp
+1
-1
1 addition, 1 deletion
indra/llui/llbutton.cpp
indra/llui/llbutton.h
+1
-1
1 addition, 1 deletion
indra/llui/llbutton.h
indra/llui/lluistring.cpp
+13
-0
13 additions, 0 deletions
indra/llui/lluistring.cpp
indra/llui/lluistring.h
+4
-0
4 additions, 0 deletions
indra/llui/lluistring.h
with
19 additions
and
2 deletions
indra/llui/llbutton.cpp
+
1
−
1
View file @
7eabd5e0
...
...
@@ -1086,7 +1086,7 @@ void LLButton::autoResize()
resize
(
getCurrentLabel
());
}
void
LLButton
::
resize
(
LLUIString
label
)
void
LLButton
::
resize
(
const
LLUIString
&
label
)
{
// get label length
S32
label_width
=
mGLFont
->
getWidth
(
label
.
getString
());
...
...
This diff is collapsed.
Click to expand it.
indra/llui/llbutton.h
+
1
−
1
View file @
7eabd5e0
...
...
@@ -237,7 +237,7 @@ class LLButton
LLFontGL
::
HAlign
getImageOverlayHAlign
()
const
{
return
mImageOverlayAlignment
;
}
void
autoResize
();
// resize with label of current btn state
void
resize
(
LLUIString
label
);
// resize with label input
void
resize
(
const
LLUIString
&
label
);
// resize with label input
void
setLabel
(
const
LLStringExplicit
&
label
);
virtual
BOOL
setLabelArg
(
const
std
::
string
&
key
,
const
LLStringExplicit
&
text
);
void
setLabelUnselected
(
const
LLStringExplicit
&
label
);
...
...
This diff is collapsed.
Click to expand it.
indra/llui/lluistring.cpp
+
13
−
0
View file @
7eabd5e0
...
...
@@ -41,12 +41,25 @@ LLUIString::LLUIString(const std::string& instring, const LLStringUtil::format_m
dirty
();
}
LLUIString
::
LLUIString
(
std
::
string
&&
instring
,
const
LLStringUtil
::
format_map_t
&
args
)
:
mOrig
(
std
::
move
(
instring
)),
mArgs
(
new
LLStringUtil
::
format_map_t
(
args
))
{
dirty
();
}
void
LLUIString
::
assign
(
const
std
::
string
&
s
)
{
mOrig
=
s
;
dirty
();
}
void
LLUIString
::
assign
(
std
::
string
&&
s
)
{
mOrig
=
std
::
move
(
s
);
dirty
();
}
void
LLUIString
::
setArgList
(
const
LLStringUtil
::
format_map_t
&
args
)
{
...
...
This diff is collapsed.
Click to expand it.
indra/llui/lluistring.h
+
4
−
0
View file @
7eabd5e0
...
...
@@ -60,11 +60,15 @@ class LLUIString
// and modify mOrig where appropriate
LLUIString
()
:
mArgs
(
NULL
),
mNeedsResult
(
false
),
mNeedsWResult
(
false
)
{}
LLUIString
(
const
std
::
string
&
instring
,
const
LLStringUtil
::
format_map_t
&
args
);
LLUIString
(
std
::
string
&&
instring
,
const
LLStringUtil
::
format_map_t
&
args
);
LLUIString
(
const
std
::
string
&
instring
)
:
mArgs
(
NULL
)
{
assign
(
instring
);
}
LLUIString
(
std
::
string
&&
instring
)
:
mArgs
(
NULL
)
{
assign
(
std
::
move
(
instring
));
}
~
LLUIString
()
{
delete
mArgs
;
}
void
assign
(
const
std
::
string
&
instring
);
void
assign
(
std
::
string
&&
instring
);
LLUIString
&
operator
=
(
const
std
::
string
&
s
)
{
assign
(
s
);
return
*
this
;
}
LLUIString
&
operator
=
(
std
::
string
&&
s
)
{
assign
(
std
::
move
(
s
));
return
*
this
;
}
void
setArgList
(
const
LLStringUtil
::
format_map_t
&
args
);
void
setArgs
(
const
LLStringUtil
::
format_map_t
&
args
)
{
setArgList
(
args
);
}
...
...
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