summaryrefslogtreecommitdiff
path: root/indra/newview/llfloateruipreview.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-07-27 15:17:57 +0800
committerErik Kundiman <erik@megapahit.org>2024-07-28 08:24:59 +0800
commit96a81b5ecbe3bffb582ded930752c0523df5e80a (patch)
treea87a0bd09fd980562e88150dbfea3819d28d9f12 /indra/newview/llfloateruipreview.cpp
parent06e8f0c443c1ba7858d000c6d695b7e988e02053 (diff)
parented73208eb96b862b97fa285036edea1e792ca3c6 (diff)
Merge remote-tracking branch 'secondlife/release/2024.06-atlasaurus' into 2024.06-atlasaurus
Diffstat (limited to 'indra/newview/llfloateruipreview.cpp')
-rw-r--r--indra/newview/llfloateruipreview.cpp172
1 files changed, 86 insertions, 86 deletions
diff --git a/indra/newview/llfloateruipreview.cpp b/indra/newview/llfloateruipreview.cpp
index b2de352793..69459a4e98 100644
--- a/indra/newview/llfloateruipreview.cpp
+++ b/indra/newview/llfloateruipreview.cpp
@@ -139,23 +139,23 @@ public:
virtual ~LLFloaterUIPreview();
std::string getLocStr(S32 ID); // fetches the localization string based on what is selected in the drop-down menu
- void displayFloater(BOOL click, S32 ID); // needs to be public so live file can call it when it finds an update
+ void displayFloater(bool click, S32 ID); // needs to be public so live file can call it when it finds an update
- /*virtual*/ BOOL postBuild();
+ /*virtual*/ bool postBuild();
/*virtual*/ void onClose(bool app_quitting);
void refreshList(); // refresh list (empty it out and fill it up from scratch)
void addFloaterEntry(const std::string& path); // add a single file's entry to the list of floaters
- static BOOL containerType(LLView* viewp); // check if the element is a container type and tree traverses need to look at its children
+ static bool containerType(LLView* viewp); // check if the element is a container type and tree traverses need to look at its children
public:
LLPreviewedFloater* mDisplayedFloater; // the floater which is currently being displayed
LLPreviewedFloater* mDisplayedFloater_2; // the floater which is currently being displayed
LLGUIPreviewLiveFile* mLiveFile; // live file for checking for updates to the currently-displayed XML file
LLOverlapPanel* mOverlapPanel; // custom overlapping elements panel
- // BOOL mHighlightingDiffs; // bool for whether localization diffs are being highlighted or not
- BOOL mHighlightingOverlaps; // bool for whether overlapping elements are being highlighted
+ // bool mHighlightingDiffs; // bool for whether localization diffs are being highlighted or not
+ bool mHighlightingOverlaps; // bool for whether overlapping elements are being highlighted
// typedef std::map<std::string,std::pair<std::list<std::string>,std::list<std::string> > > DiffMap; // this version copies the lists etc., and thus is bad memory-wise
typedef std::list<std::string> StringList;
@@ -196,11 +196,11 @@ private:
void highlightChangedElements(); // look up the list of elements to highlight and highlight them in the current floater
void highlightChangedFiles(); // look up the list of changed files to highlight and highlight them in the scroll list
void findOverlapsInChildren(LLView* parent); // fill the map below with element overlap information
- static BOOL overlapIgnorable(LLView* viewp); // check it the element can be ignored for overlap/localization purposes
+ static bool overlapIgnorable(LLView* viewp); // check it the element can be ignored for overlap/localization purposes
// check if two elements overlap using their rectangles
// used instead of llrect functions because by adding a few pixels of leeway I can cut down drastically on the number of overlaps
- BOOL elementOverlap(LLView* view1, LLView* view2);
+ bool elementOverlap(LLView* view1, LLView* view2);
// Button/drop-down action listeners (self explanatory)
void onClickDisplayFloater(S32 id);
@@ -244,7 +244,7 @@ public:
virtual ~LLGUIPreviewLiveFile();
LLFloaterUIPreview* mParent;
LLFadeEventTimer* mFadeTimer; // timer for fade-to-yellow-and-back effect to warn that file has been reloaded
- BOOL mFirstFade; // setting this avoids showing the fade reload warning on first load
+ bool mFirstFade; // setting this avoids showing the fade reload warning on first load
std::string mFileName;
protected:
bool loadFile();
@@ -255,10 +255,10 @@ class LLFadeEventTimer : public LLEventTimer
{
public:
LLFadeEventTimer(F32 refresh, LLGUIPreviewLiveFile* parent);
- BOOL tick();
+ bool tick();
LLGUIPreviewLiveFile* mParent;
private:
- BOOL mFadingOut; // fades in then out; this is toggled in between
+ bool mFadingOut; // fades in then out; this is toggled in between
LLColor4 mOriginalColor; // original color; color is reset to this after fade is coimplete
};
@@ -274,9 +274,9 @@ public:
}
virtual void draw();
- BOOL handleRightMouseDown(S32 x, S32 y, MASK mask);
- BOOL handleToolTip(S32 x, S32 y, MASK mask);
- BOOL selectElement(LLView* parent, int x, int y, int depth); // select element to display its overlappers
+ bool handleRightMouseDown(S32 x, S32 y, MASK mask);
+ bool handleToolTip(S32 x, S32 y, MASK mask);
+ bool selectElement(LLView* parent, int x, int y, int depth); // select element to display its overlappers
LLFloaterUIPreview* mFloaterUIPreview;
@@ -312,7 +312,7 @@ LLLocalizationResetForcer::~LLLocalizationResetForcer()
LLGUIPreviewLiveFile::LLGUIPreviewLiveFile(std::string path, std::string name, LLFloaterUIPreview* parent)
: mFileName(name),
mParent(parent),
- mFirstFade(TRUE),
+ mFirstFade(true),
mFadeTimer(NULL),
LLLiveFile(path, 1.0)
{}
@@ -330,10 +330,10 @@ LLGUIPreviewLiveFile::~LLGUIPreviewLiveFile()
// Live file load
bool LLGUIPreviewLiveFile::loadFile()
{
- mParent->displayFloater(FALSE,1); // redisplay the floater
- if(mFirstFade) // only fade if it wasn't just clicked on; can't use "clicked" BOOL below because of an oddity with setting LLLiveFile initial state
+ mParent->displayFloater(false,1); // redisplay the floater
+ if(mFirstFade) // only fade if it wasn't just clicked on; can't use "clicked" bool below because of an oddity with setting LLLiveFile initial state
{
- mFirstFade = FALSE;
+ mFirstFade = false;
}
else
{
@@ -349,24 +349,24 @@ bool LLGUIPreviewLiveFile::loadFile()
// Initialize fade event timer
LLFadeEventTimer::LLFadeEventTimer(F32 refresh, LLGUIPreviewLiveFile* parent)
: mParent(parent),
- mFadingOut(TRUE),
+ mFadingOut(true),
LLEventTimer(refresh)
{
mOriginalColor = mParent->mParent->mDisplayedFloater->getBackgroundColor();
}
// Single tick of fade event timer: increment the color
-BOOL LLFadeEventTimer::tick()
+bool LLFadeEventTimer::tick()
{
float diff = 0.04f;
- if(TRUE == mFadingOut) // set fade for in/out color direction
+ if(true == mFadingOut) // set fade for in/out color direction
{
diff = -diff;
}
if(NULL == mParent) // no more need to tick, so suicide
{
- return TRUE;
+ return true;
}
// Set up colors
@@ -386,10 +386,10 @@ BOOL LLFadeEventTimer::tick()
if(bg_color[2] <= 0.0f) // end of fade out, start fading in
{
- mFadingOut = FALSE;
+ mFadingOut = false;
}
- return FALSE;
+ return false;
}
// Constructor
@@ -398,8 +398,8 @@ LLFloaterUIPreview::LLFloaterUIPreview(const LLSD& key)
mDisplayedFloater(NULL),
mDisplayedFloater_2(NULL),
mLiveFile(NULL),
- // sHighlightingDiffs(FALSE),
- mHighlightingOverlaps(FALSE),
+ // sHighlightingDiffs(false),
+ mHighlightingOverlaps(false),
mLastDisplayedX(0),
mLastDisplayedY(0)
{
@@ -424,7 +424,7 @@ LLFloaterUIPreview::~LLFloaterUIPreview()
}
// Perform post-build setup (defined in superclass)
-BOOL LLFloaterUIPreview::postBuild()
+bool LLFloaterUIPreview::postBuild()
{
LLPanel* main_panel_tmp = getChild<LLPanel>("main_panel"); // get a pointer to the main panel in order to...
mFileList = main_panel_tmp->getChild<LLScrollListCtrl>("name_list"); // save pointer to file list
@@ -482,8 +482,8 @@ BOOL LLFloaterUIPreview::postBuild()
mDelim = gDirUtilp->getDirDelimiter(); // initialize delimiter to dir sep slash
// refresh list of available languages (EN will still be default)
- BOOL found = TRUE;
- BOOL found_en_us = FALSE;
+ bool found = true;
+ bool found_en_us = false;
std::string language_directory;
std::string xui_dir = get_xui_dir(); // directory containing localizations -- don't forget trailing delim
mLanguageSelection->removeall(); // clear out anything temporarily in list from XML
@@ -503,7 +503,7 @@ BOOL LLFloaterUIPreview::postBuild()
{
if(!strncmp("en",language_directory.c_str(),5)) // remember if we've seen en, so we can make it default
{
- found_en_us = TRUE;
+ found_en_us = true;
}
else
{
@@ -528,7 +528,7 @@ BOOL LLFloaterUIPreview::postBuild()
refreshList(); // refresh the list of available floaters
- return TRUE;
+ return true;
}
// Callback for language combo box selection: refresh current floater when you change languages
@@ -542,7 +542,7 @@ void LLFloaterUIPreview::onLanguageComboSelect(LLUICtrl* ctrl)
if(mDisplayedFloater)
{
onClickCloseDisplayedFloater(PRIMARY_FLOATER);
- displayFloater(TRUE,1);
+ displayFloater(true,1);
}
}
else
@@ -550,7 +550,7 @@ void LLFloaterUIPreview::onLanguageComboSelect(LLUICtrl* ctrl)
if(mDisplayedFloater_2)
{
onClickCloseDisplayedFloater(PRIMARY_FLOATER);
- displayFloater(TRUE,2); // *TODO: make take an arg
+ displayFloater(true,2); // *TODO: make take an arg
}
}
@@ -642,7 +642,7 @@ void LLFloaterUIPreview::refreshList()
// Note: the mask doesn't seem to accept regular expressions, so there need to be two directory searches here
mFileList->clearRows(); // empty list
std::string name;
- BOOL found = TRUE;
+ bool found = true;
LLDirIterator floater_iter(getLocalizedDirectory(), "floater_*.xml");
while(found) // for every floater file that matches the pattern
@@ -652,7 +652,7 @@ void LLFloaterUIPreview::refreshList()
addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path)
}
}
- found = TRUE;
+ found = true;
LLDirIterator inspect_iter(getLocalizedDirectory(), "inspect_*.xml");
while(found) // for every inspector file that matches the pattern
@@ -662,7 +662,7 @@ void LLFloaterUIPreview::refreshList()
addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path)
}
}
- found = TRUE;
+ found = true;
LLDirIterator menu_iter(getLocalizedDirectory(), "menu_*.xml");
while(found) // for every menu file that matches the pattern
@@ -672,7 +672,7 @@ void LLFloaterUIPreview::refreshList()
addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path)
}
}
- found = TRUE;
+ found = true;
LLDirIterator panel_iter(getLocalizedDirectory(), "panel_*.xml");
while(found) // for every panel file that matches the pattern
@@ -682,7 +682,7 @@ void LLFloaterUIPreview::refreshList()
addFloaterEntry(name.c_str()); // and add it to the list (file name only; localization code takes care of rest of path)
}
}
- found = TRUE;
+ found = true;
LLDirIterator sidepanel_iter(getLocalizedDirectory(), "sidepanel_*.xml");
while(found) // for every sidepanel file that matches the pattern
@@ -715,7 +715,7 @@ void LLFloaterUIPreview::addFloaterEntry(const std::string& path)
// Get name of floater:
LLXmlTree xml_tree;
std::string full_path = getLocalizedDirectory() + path; // get full path
- BOOL success = xml_tree.parseFile(full_path.c_str(), TRUE); // parse xml
+ bool success = xml_tree.parseFile(full_path.c_str(), true); // parse xml
std::string entry_name;
std::string entry_title;
if(success)
@@ -772,13 +772,13 @@ void LLFloaterUIPreview::addFloaterEntry(const std::string& path)
// Respond to button click to display/refresh currently-selected floater
void LLFloaterUIPreview::onClickDisplayFloater(S32 caller_id)
{
- displayFloater(TRUE, caller_id);
+ displayFloater(true, caller_id);
}
// Saves the current floater/panel
void LLFloaterUIPreview::onClickSaveFloater(S32 caller_id)
{
- displayFloater(TRUE, caller_id);
+ displayFloater(true, caller_id);
popupAndPrintWarning("Save-floater functionality removed, use XML schema to clean up XUI files");
}
@@ -790,7 +790,7 @@ void LLFloaterUIPreview::onClickSaveAll(S32 caller_id)
for (int index = 0; index < listSize; index++)
{
mFileList->selectNthItem(index);
- displayFloater(TRUE, caller_id);
+ displayFloater(true, caller_id);
}
popupAndPrintWarning("Save-floater functionality removed, use XML schema to clean up XUI files");
}
@@ -798,7 +798,7 @@ void LLFloaterUIPreview::onClickSaveAll(S32 caller_id)
// Actually display the floater
// Only set up a new live file if this came from a click (at which point there should be no existing live file), rather than from the live file's update itself;
// otherwise, we get an infinite loop as the live file keeps recreating itself. That means this function is generally called twice.
-void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID)
+void LLFloaterUIPreview::displayFloater(bool click, S32 ID)
{
// Convince UI that we're in a different language (the one selected on the drop-down menu)
LLLocalizationResetForcer reset_forcer(this, ID); // save old language in reset forcer object (to be reset upon destruction when it falls out of scope)
@@ -806,7 +806,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID)
LLPreviewedFloater** floaterp = (ID == 1 ? &(mDisplayedFloater) : &(mDisplayedFloater_2));
if(ID == 1)
{
- BOOL floater_already_open = mDisplayedFloater != NULL;
+ bool floater_already_open = mDisplayedFloater != NULL;
if(floater_already_open) // if we are already displaying a floater
{
mLastDisplayedX = mDisplayedFloater->calcScreenRect().mLeft; // save floater's last known position to put the new one there
@@ -860,7 +860,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID)
panel->buildFromFile(path); // build it
panel->setOrigin(2,2); // reset its origin point so it's not offset by -left or other XUI attributes
(*floaterp)->setTitle(path); // use the file name as its title, since panels have no guaranteed meaningful name attribute
- panel->setUseBoundingRect(TRUE); // enable the use of its outer bounding rect (normally disabled because it's O(n) on the number of sub-elements)
+ panel->setUseBoundingRect(true); // enable the use of its outer bounding rect (normally disabled because it's O(n) on the number of sub-elements)
panel->updateBoundingRect(); // update bounding rect
LLRect bounding_rect = panel->getBoundingRect(); // get the bounding rect
LLRect new_rect = panel->getRect(); // get the panel's rect
@@ -880,15 +880,15 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID)
// *HACK: Remove ability to close it; if you close it, its destructor gets called, but we don't know it's null and try to delete it again,
// resulting in a double free
- (*floaterp)->setCanClose(FALSE);
+ (*floaterp)->setCanClose(false);
if(ID == 1)
{
- mCloseOtherButton->setEnabled(TRUE); // enable my floater's close button
+ mCloseOtherButton->setEnabled(true); // enable my floater's close button
}
else
{
- mCloseOtherButton_2->setEnabled(TRUE);
+ mCloseOtherButton_2->setEnabled(true);
}
// Add localization to title so user knows whether it's localized or defaulted to en
@@ -921,7 +921,7 @@ void LLFloaterUIPreview::displayFloater(BOOL click, S32 ID)
if(ID == 1)
{
- mToggleOverlapButton->setEnabled(TRUE);
+ mToggleOverlapButton->setEnabled(true);
}
if(LLView::sHighlightingDiffs && click && ID == 1)
@@ -1035,7 +1035,7 @@ void LLFloaterUIPreview::getExecutablePath(const std::vector<std::string>& filen
#if LL_DARWIN
// on Mac, if it's an application bundle, figure out the actual path from the Info.plist file
CFStringRef path_cfstr = CFStringCreateWithCString(kCFAllocatorDefault, chosen_path.c_str(), kCFStringEncodingMacRoman); // get path as a CFStringRef
- CFURLRef path_url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path_cfstr, kCFURLPOSIXPathStyle, TRUE); // turn it into a CFURLRef
+ CFURLRef path_url = CFURLCreateWithFileSystemPath(kCFAllocatorDefault, path_cfstr, kCFURLPOSIXPathStyle, true); // turn it into a CFURLRef
CFBundleRef chosen_bundle = CFBundleCreate(kCFAllocatorDefault, path_url); // get a handle for the bundle
if(NULL != chosen_bundle)
{
@@ -1114,13 +1114,13 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting()
{
// Get the file and make sure it exists
std::string path_in_textfield = mDiffPathTextBox->getText(); // get file path
- BOOL error = FALSE;
+ bool error = false;
if(std::string("") == path_in_textfield) // check for blank file
{
std::string warning = "Unable to highlight differences because no file was provided; fill in the relevant text field";
popupAndPrintWarning(warning);
- error = TRUE;
+ error = true;
}
llstat dummy;
@@ -1128,13 +1128,13 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting()
{
std::string warning = std::string("Unable to highlight differences because an invalid path to a difference file was provided:\"") + path_in_textfield + "\"";
popupAndPrintWarning(warning);
- error = TRUE;
+ error = true;
}
// Build a list of changed elements as given by the XML
std::list<std::string> changed_element_names;
LLXmlTree xml_tree;
- BOOL success = xml_tree.parseFile(path_in_textfield.c_str(), TRUE);
+ bool success = xml_tree.parseFile(path_in_textfield.c_str(), true);
if(success && !error)
{
@@ -1164,7 +1164,7 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting()
{
std::string warning = std::string("Child was neither a file or an error, but rather the following:\"") + std::string(child->getName()) + "\"";
popupAndPrintWarning(warning);
- error = TRUE;
+ error = true;
break;
}
}
@@ -1173,19 +1173,19 @@ void LLFloaterUIPreview::onClickToggleDiffHighlighting()
{
std::string warning = std::string("Root node not named XuiDelta:\"") + path_in_textfield + "\"";
popupAndPrintWarning(warning);
- error = TRUE;
+ error = true;
}
}
else if(!error)
{
std::string warning = std::string("Unable to create tree from XML:\"") + path_in_textfield + "\"";
popupAndPrintWarning(warning);
- error = TRUE;
+ error = true;
}
if(error) // if we encountered an error, reset the button to off
{
- mToggleHighlightButton->setToggleState(FALSE);
+ mToggleHighlightButton->setToggleState(false);
}
else // only toggle if we didn't encounter an error
{
@@ -1259,17 +1259,17 @@ void LLFloaterUIPreview::highlightChangedElements()
boost::char_separator<char> sep(".");
tokenizer tokens(*iter, sep);
tokenizer::iterator token_iter;
- BOOL failed = FALSE;
+ bool failed = false;
for(token_iter = tokens.begin(); token_iter != tokens.end(); ++token_iter)
{
- element = element->findChild<LLView>(*token_iter,FALSE); // try to find element: don't recur, and don't create if missing
+ element = element->findChild<LLView>(*token_iter,false); // try to find element: don't recur, and don't create if missing
// if we still didn't find it...
if(NULL == element)
{
LL_INFOS() << "Unable to find element in XuiDelta file named \"" << *iter << "\" in file \"" << mLiveFile->mFileName <<
"\". The element may no longer exist, the path may be incorrect, or it may not be a non-displayable element (not an LLView) such as a \"string\" type." << LL_ENDL;
- failed = TRUE;
+ failed = true;
break;
}
}
@@ -1302,10 +1302,10 @@ void LLFloaterUIPreview::highlightChangedFiles()
{
for(DiffMap::iterator iter = mDiffsMap.begin(); iter != mDiffsMap.end(); ++iter) // for every file listed in diffs
{
- LLScrollListItem* item = mFileList->getItemByLabel(std::string(iter->first), FALSE, 1);
+ LLScrollListItem* item = mFileList->getItemByLabel(std::string(iter->first), false, 1);
if(item)
{
- item->setHighlighted(TRUE);
+ item->setHighlighted(true);
}
}
}
@@ -1315,8 +1315,8 @@ void LLFloaterUIPreview::onClickCloseDisplayedFloater(S32 caller_id)
{
if(caller_id == PRIMARY_FLOATER)
{
- mCloseOtherButton->setEnabled(FALSE);
- mToggleOverlapButton->setEnabled(FALSE);
+ mCloseOtherButton->setEnabled(false);
+ mToggleOverlapButton->setEnabled(false);
if(mDisplayedFloater)
{
@@ -1343,7 +1343,7 @@ void LLFloaterUIPreview::onClickCloseDisplayedFloater(S32 caller_id)
}
else
{
- mCloseOtherButton_2->setEnabled(FALSE);
+ mCloseOtherButton_2->setEnabled(false);
delete mDisplayedFloater_2;
mDisplayedFloater_2 = NULL;
}
@@ -1370,7 +1370,7 @@ void append_view_tooltip(LLView* tooltip_view, std::string *tooltip_msg)
tooltip_msg->append( msg );
}
-BOOL LLPreviewedFloater::handleToolTip(S32 x, S32 y, MASK mask)
+bool LLPreviewedFloater::handleToolTip(S32 x, S32 y, MASK mask)
{
if (!sShowRectangles)
{
@@ -1414,13 +1414,13 @@ BOOL LLPreviewedFloater::handleToolTip(S32 x, S32 y, MASK mask)
LLToolTipMgr::instance().show(LLToolTip::Params()
.message(tooltip_msg)
.max_width(400));
- return TRUE;
+ return true;
}
-BOOL LLPreviewedFloater::handleRightMouseDown(S32 x, S32 y, MASK mask)
+bool LLPreviewedFloater::handleRightMouseDown(S32 x, S32 y, MASK mask)
{
selectElement(this,x,y,0);
- return TRUE;
+ return true;
}
// *NOTE: In order to hide all of the overlapping elements of the selected element so as to see it in context, here is what you would need to do:
@@ -1428,15 +1428,15 @@ BOOL LLPreviewedFloater::handleRightMouseDown(S32 x, S32 y, MASK mask)
// what you've really selected is a list of elements: the one you clicked on and everything that overlaps it.
// -The user then selects one of the elements from this list the overlap panel (click handling to the overlap panel would have to be added).
// This becomes the final selection (as opposed to the intermediate selection that was just made).
-// -Everything else that is currently displayed on the overlap panel should be hidden from view in the previewed floater itself (setVisible(FALSE)).
+// -Everything else that is currently displayed on the overlap panel should be hidden from view in the previewed floater itself (setVisible(false)).
// -Subsequent clicks on other elements in the overlap panel (they should still be there) should make other elements the final selection.
// -On close or on the click of a new button, everything should be shown again and all selection state should be cleared.
// ~Jacob, 8/08
-BOOL LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth)
+bool LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth)
{
if(getVisible())
{
- BOOL handled = FALSE;
+ bool handled = false;
if(LLFloaterUIPreview::containerType(parent))
{
for(child_list_const_iter_t child_it = parent->getChildList()->begin(); child_it != parent->getChildList()->end(); ++child_it)
@@ -1448,7 +1448,7 @@ BOOL LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth)
child->getVisible() &&
selectElement(child, x, y, ++depth))
{
- handled = TRUE;
+ handled = true;
break;
}
}
@@ -1458,11 +1458,11 @@ BOOL LLPreviewedFloater::selectElement(LLView* parent, int x, int y, int depth)
{
LLView::sPreviewClickedElement = parent;
}
- return TRUE;
+ return true;
}
else
{
- return FALSE;
+ return false;
}
}
@@ -1473,7 +1473,7 @@ void LLPreviewedFloater::draw()
// Set and unset sDrawPreviewHighlights flag so as to avoid using two flags
if(mFloaterUIPreview->mHighlightingOverlaps)
{
- LLView::sDrawPreviewHighlights = TRUE;
+ LLView::sDrawPreviewHighlights = true;
}
// If we're looking for truncations, draw debug rects for the displayed
@@ -1493,7 +1493,7 @@ void LLPreviewedFloater::draw()
if(mFloaterUIPreview->mHighlightingOverlaps)
{
- LLView::sDrawPreviewHighlights = FALSE;
+ LLView::sDrawPreviewHighlights = false;
}
}
}
@@ -1519,7 +1519,7 @@ void LLFloaterUIPreview::onClickToggleOverlapping()
else
{
mHighlightingOverlaps = !mHighlightingOverlaps;
- displayFloater(FALSE,1);
+ displayFloater(false,1);
setRect(LLRect(getRect().mLeft,getRect().mTop,getRect().mRight + mOverlapPanel->getRect().getWidth(),getRect().mBottom));
setResizeLimits(width + mOverlapPanel->getRect().getWidth(), height);
}
@@ -1564,7 +1564,7 @@ void LLFloaterUIPreview::findOverlapsInChildren(LLView* parent)
// *HACK: don't overlap with the drag handle and various other elements
// This is using dynamic casts because there is no object-oriented way to tell which elements contain localizable text. These are a few that are ignorable.
// *NOTE: If a list of elements which have localizable content were created, this function should return false if viewp's class is in that list.
-BOOL LLFloaterUIPreview::overlapIgnorable(LLView* viewp)
+bool LLFloaterUIPreview::overlapIgnorable(LLView* viewp)
{
return NULL != dynamic_cast<LLDragHandle*>(viewp) ||
NULL != dynamic_cast<LLViewBorder*>(viewp) ||
@@ -1573,13 +1573,13 @@ BOOL LLFloaterUIPreview::overlapIgnorable(LLView* viewp)
// *HACK: these are the only two container types as of 8/08, per Richard
// This is using dynamic casts because there is no object-oriented way to tell which elements are containers.
-BOOL LLFloaterUIPreview::containerType(LLView* viewp)
+bool LLFloaterUIPreview::containerType(LLView* viewp)
{
return NULL != dynamic_cast<LLPanel*>(viewp) || NULL != dynamic_cast<LLLayoutStack*>(viewp);
}
// Check if two llview's rectangles overlap, with some tolerance
-BOOL LLFloaterUIPreview::elementOverlap(LLView* view1, LLView* view2)
+bool LLFloaterUIPreview::elementOverlap(LLView* view1, LLView* view2)
{
LLSD rec1 = view1->getRect().getValue();
LLSD rec2 = view2->getRect().getValue();
@@ -1600,7 +1600,7 @@ void LLOverlapPanel::draw()
if(!LLView::sPreviewClickedElement)
{
LLUI::translate(5,getRect().getHeight()-20); // translate to top-5,left-5
- LLView::sDrawPreviewHighlights = FALSE;
+ LLView::sDrawPreviewHighlights = false;
LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection_text, 0, 0, 0, text_color,
LLFontGL::LEFT, LLFontGL::BASELINE, LLFontGL::NORMAL, LLFontGL::NO_SHADOW);
}
@@ -1616,7 +1616,7 @@ void LLOverlapPanel::draw()
if(overlappers.size() == 0)
{
LLUI::translate(5,getRect().getHeight()-20); // translate to top-5,left-5
- LLView::sDrawPreviewHighlights = FALSE;
+ LLView::sDrawPreviewHighlights = false;
std::string current_selection = std::string(current_selection_text + LLView::sPreviewClickedElement->getName() + " (no elements overlap)");
S32 text_width = LLFontGL::getFontSansSerifSmall()->getWidth(current_selection) + 10;
LLFontGL::getFontSansSerifSmall()->renderUTF8(current_selection, 0, 0, 0, text_color,
@@ -1628,10 +1628,10 @@ void LLOverlapPanel::draw()
}
// recalculate required with and height; otherwise use cached
- BOOL need_to_recalculate_bounds = FALSE;
+ bool need_to_recalculate_bounds = false;
if(mLastClickedElement == NULL)
{
- need_to_recalculate_bounds = TRUE;
+ need_to_recalculate_bounds = true;
}
if(NULL == mLastClickedElement)
@@ -1681,7 +1681,7 @@ void LLOverlapPanel::draw()
}
LLUI::translate(5,getRect().getHeight()-10); // translate to top left
- LLView::sDrawPreviewHighlights = FALSE;
+ LLView::sDrawPreviewHighlights = false;
// draw currently-selected element at top of overlappers
LLUI::translate(0,-mSpacing);