2016-08-08 23:11:27 +03:00
|
|
|
/************************************************************************
|
|
|
|
* file name : globals.cpp
|
|
|
|
* ----------------- :
|
|
|
|
* creation time : 2016/08/03
|
|
|
|
* author : Victor Zarubkin
|
|
|
|
* email : v.s.zarubkin@gmail.com
|
|
|
|
* ----------------- :
|
|
|
|
* description : The file contains implementation of global constants and variables for profiler gui.
|
|
|
|
* ----------------- :
|
|
|
|
* change log : * 2016/08/03 Victor Zarubkin: initial commit.
|
|
|
|
* :
|
|
|
|
* : *
|
|
|
|
* ----------------- :
|
2016-09-06 21:49:32 +03:00
|
|
|
* license : Lightweight profiler library for c++
|
|
|
|
* : Copyright(C) 2016 Sergey Yagovtsev, Victor Zarubkin
|
|
|
|
* :
|
2016-11-13 16:39:59 +03:00
|
|
|
* :
|
|
|
|
* : Licensed under the Apache License, Version 2.0 (the "License");
|
|
|
|
* : you may not use this file except in compliance with the License.
|
|
|
|
* : You may obtain a copy of the License at
|
|
|
|
* :
|
|
|
|
* : http://www.apache.org/licenses/LICENSE-2.0
|
|
|
|
* :
|
|
|
|
* : Unless required by applicable law or agreed to in writing, software
|
|
|
|
* : distributed under the License is distributed on an "AS IS" BASIS,
|
|
|
|
* : WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
|
|
* : See the License for the specific language governing permissions and
|
|
|
|
* : limitations under the License.
|
|
|
|
* :
|
|
|
|
* :
|
|
|
|
* : GNU General Public License Usage
|
|
|
|
* : Alternatively, this file may be used under the terms of the GNU
|
|
|
|
* : General Public License as published by the Free Software Foundation,
|
|
|
|
* : either version 3 of the License, or (at your option) any later version.
|
2016-09-06 21:49:32 +03:00
|
|
|
* :
|
|
|
|
* : This program 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 General Public License for more details.
|
|
|
|
* :
|
|
|
|
* : You should have received a copy of the GNU General Public License
|
|
|
|
* : along with this program.If not, see <http://www.gnu.org/licenses/>.
|
2016-08-03 23:00:04 +03:00
|
|
|
************************************************************************/
|
|
|
|
|
2016-08-08 22:45:57 +03:00
|
|
|
#define IGNORE_GLOBALS_DECLARATION
|
2016-08-03 23:00:04 +03:00
|
|
|
#include "globals.h"
|
2016-08-08 22:45:57 +03:00
|
|
|
#undef IGNORE_GLOBALS_DECLARATION
|
2016-08-03 23:00:04 +03:00
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|
|
|
|
namespace profiler_gui {
|
|
|
|
|
2016-08-18 23:26:41 +03:00
|
|
|
EasyGlobals& EasyGlobals::instance()
|
2016-08-03 23:00:04 +03:00
|
|
|
{
|
2016-08-18 23:26:41 +03:00
|
|
|
static EasyGlobals globals;
|
2016-08-03 23:00:04 +03:00
|
|
|
return globals;
|
|
|
|
}
|
|
|
|
|
2016-08-18 23:26:41 +03:00
|
|
|
EasyGlobals::EasyGlobals()
|
2016-09-17 11:10:45 +03:00
|
|
|
: selected_thread(0U)
|
2016-08-24 01:00:24 +03:00
|
|
|
, selected_block(::profiler_gui::numeric_max<decltype(selected_block)>())
|
|
|
|
, chrono_text_position(ChronoTextPosition_Center)
|
2016-11-13 22:02:47 +03:00
|
|
|
, frame_time(4e4f)
|
2016-11-19 04:52:45 +03:00
|
|
|
, blocks_spacing(2)
|
|
|
|
, blocks_size_min(3)
|
|
|
|
, blocks_narrow_size(20)
|
2016-09-25 11:49:49 +03:00
|
|
|
, connected(false)
|
2016-09-23 23:50:43 +03:00
|
|
|
, enable_event_indicators(true)
|
2016-09-14 23:13:38 +03:00
|
|
|
, enable_statistics(true)
|
2016-08-04 23:35:38 +03:00
|
|
|
, draw_graphics_items_borders(true)
|
2016-11-20 14:39:01 +03:00
|
|
|
, hide_narrow_children(false)
|
2016-08-09 00:14:58 +03:00
|
|
|
, display_only_relevant_stats(true)
|
2016-08-23 22:44:04 +03:00
|
|
|
, collapse_items_on_tree_close(false)
|
|
|
|
, all_items_expanded_by_default(true)
|
2016-11-20 21:01:33 +03:00
|
|
|
, only_current_thread_hierarchy(false)
|
2016-08-23 23:50:30 +03:00
|
|
|
, bind_scene_and_tree_expand_status(true)
|
2016-08-03 23:00:04 +03:00
|
|
|
{
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
} // END of namespace profiler_gui.
|
|
|
|
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
|