Clean up and updates
Cleaned up header bloatyness in linden_common
Moved around things to be in line with Linden Lab
Updated llinitparam and imported its new dependencies
Removed dohexeditor and related files
Removed unused legacy files
/\_..._/\
|/ \_/ \|
| o.-.o |
\ ( O ) /
/'--U--'\
| .:. | /\
| /:;:\ |` /
Drake | |:;:| |-'
Arconis / |'-'| \
`""` `""`
This commit is contained in:
@@ -12,7 +12,6 @@ include(LLRender)
|
||||
include(LLWindow)
|
||||
include(LLVFS)
|
||||
include(LLXML)
|
||||
include(LLXUIXML)
|
||||
|
||||
include_directories(
|
||||
${LLCOMMON_INCLUDE_DIRS}
|
||||
@@ -24,7 +23,6 @@ include_directories(
|
||||
${LLWINDOW_INCLUDE_DIRS}
|
||||
${LLVFS_INCLUDE_DIRS}
|
||||
${LLXML_INCLUDE_DIRS}
|
||||
${LLXUIXML_INCLUDE_DIRS}
|
||||
)
|
||||
|
||||
set(llui_SOURCE_FILES
|
||||
@@ -73,6 +71,7 @@ set(llui_SOURCE_FILES
|
||||
lltextparser.cpp
|
||||
lltrans.cpp
|
||||
llui.cpp
|
||||
lluicolor.cpp
|
||||
lluictrl.cpp
|
||||
lluictrlfactory.cpp
|
||||
lluiimage.cpp
|
||||
@@ -142,6 +141,7 @@ set(llui_HEADER_FILES
|
||||
lluictrl.h
|
||||
lluifwd.h
|
||||
llui.h
|
||||
lluicolor.h
|
||||
lluiimage.h
|
||||
lluistring.h
|
||||
lluixmltags.h
|
||||
@@ -165,7 +165,6 @@ target_link_libraries(llui
|
||||
llwindow
|
||||
llimage
|
||||
llvfs # ugh, just for LLDir
|
||||
llxuixml
|
||||
llxml
|
||||
llcommon # must be after llimage, llwindow, llrender
|
||||
llmath
|
||||
|
||||
87
indra/llui/lluicolor.cpp
Normal file
87
indra/llui/lluicolor.cpp
Normal file
@@ -0,0 +1,87 @@
|
||||
/**
|
||||
* @file lluicolor.cpp
|
||||
* @brief brief LLUIColor class implementation file
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#include "linden_common.h"
|
||||
|
||||
#include "lluicolor.h"
|
||||
|
||||
LLUIColor::LLUIColor()
|
||||
:mColorPtr(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
LLUIColor::LLUIColor(const LLColor4& color)
|
||||
: mColor(color),
|
||||
mColorPtr(NULL)
|
||||
{
|
||||
}
|
||||
|
||||
LLUIColor::LLUIColor(const LLUIColor* color)
|
||||
: mColorPtr(color)
|
||||
{
|
||||
}
|
||||
|
||||
void LLUIColor::set(const LLColor4& color)
|
||||
{
|
||||
mColor = color;
|
||||
mColorPtr = NULL;
|
||||
}
|
||||
|
||||
void LLUIColor::set(const LLUIColor* color)
|
||||
{
|
||||
mColorPtr = color;
|
||||
}
|
||||
|
||||
const LLColor4& LLUIColor::get() const
|
||||
{
|
||||
return (mColorPtr == NULL ? mColor : mColorPtr->get());
|
||||
}
|
||||
|
||||
LLUIColor::operator const LLColor4& () const
|
||||
{
|
||||
return get();
|
||||
}
|
||||
|
||||
const LLColor4& LLUIColor::operator()() const
|
||||
{
|
||||
return get();
|
||||
}
|
||||
|
||||
bool LLUIColor::isReference() const
|
||||
{
|
||||
return mColorPtr != NULL;
|
||||
}
|
||||
|
||||
namespace LLInitParam
|
||||
{
|
||||
// used to detect equivalence with default values on export
|
||||
bool ParamCompare<LLUIColor, false>::equals(const LLUIColor &a, const LLUIColor &b)
|
||||
{
|
||||
// do not detect value equivalence, treat pointers to colors as distinct from color values
|
||||
return (a.mColorPtr == NULL && b.mColorPtr == NULL ? a.mColor == b.mColor : a.mColorPtr == b.mColorPtr);
|
||||
}
|
||||
}
|
||||
71
indra/llui/lluicolor.h
Normal file
71
indra/llui/lluicolor.h
Normal file
@@ -0,0 +1,71 @@
|
||||
/**
|
||||
* @file lluicolor.h
|
||||
* @brief brief LLUIColor class header file
|
||||
*
|
||||
* $LicenseInfo:firstyear=2009&license=viewerlgpl$
|
||||
* Second Life Viewer Source Code
|
||||
* Copyright (C) 2010, Linden Research, Inc.
|
||||
*
|
||||
* This library is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU Lesser General Public
|
||||
* License as published by the Free Software Foundation;
|
||||
* version 2.1 of the License only.
|
||||
*
|
||||
* This library is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
||||
* Lesser General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU Lesser General Public
|
||||
* License along with this library; if not, write to the Free Software
|
||||
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
||||
*
|
||||
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
|
||||
* $/LicenseInfo$
|
||||
*/
|
||||
|
||||
#ifndef LL_LLUICOLOR_H_
|
||||
#define LL_LLUICOLOR_H_
|
||||
|
||||
#include "v4color.h"
|
||||
|
||||
namespace LLInitParam
|
||||
{
|
||||
template<typename T, bool>
|
||||
struct ParamCompare;
|
||||
}
|
||||
|
||||
class LLUIColor
|
||||
{
|
||||
public:
|
||||
LLUIColor();
|
||||
LLUIColor(const LLColor4& color);
|
||||
LLUIColor(const LLUIColor* color);
|
||||
|
||||
void set(const LLColor4& color);
|
||||
void set(const LLUIColor* color);
|
||||
|
||||
const LLColor4& get() const;
|
||||
|
||||
operator const LLColor4& () const;
|
||||
const LLColor4& operator()() const;
|
||||
|
||||
bool isReference() const;
|
||||
|
||||
private:
|
||||
friend struct LLInitParam::ParamCompare<LLUIColor, false>;
|
||||
|
||||
const LLUIColor* mColorPtr;
|
||||
LLColor4 mColor;
|
||||
};
|
||||
|
||||
namespace LLInitParam
|
||||
{
|
||||
template<>
|
||||
struct ParamCompare<LLUIColor, false>
|
||||
{
|
||||
static bool equals(const LLUIColor& a, const LLUIColor& b);
|
||||
};
|
||||
}
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user