From aca24ff5106744eafb6c87b8ffc8553d21d6b5cc Mon Sep 17 00:00:00 2001 From: dfighter1985 Date: Sat, 16 Jun 2012 00:23:20 +0200 Subject: [PATCH] CHANGED: #1471 CCtrlButton is now part of the NEL GUI library. --HG-- branch : gui-refactoring --- .../include/nel/gui}/ctrl_button.h | 1 - .../interface_v3 => nel/src/gui}/ctrl_button.cpp | 14 +++----------- code/ryzom/client/src/connection.cpp | 2 +- .../src/interface_v3/action_handler_game.cpp | 2 +- .../src/interface_v3/action_handler_misc.cpp | 2 +- .../src/interface_v3/action_handler_phrase.cpp | 2 +- .../src/interface_v3/dbgroup_build_phrase.cpp | 2 +- .../client/src/interface_v3/dbgroup_combo_box.cpp | 2 +- .../client/src/interface_v3/dbgroup_list_sheet.cpp | 2 +- .../src/interface_v3/dbgroup_list_sheet_text.cpp | 2 +- .../src/interface_v3/dbgroup_list_sheet_trade.cpp | 2 +- .../src/interface_v3/dbgroup_select_number.cpp | 2 +- .../client/src/interface_v3/group_container.cpp | 2 +- code/ryzom/client/src/interface_v3/group_html.cpp | 2 +- code/ryzom/client/src/interface_v3/group_html.h | 2 +- code/ryzom/client/src/interface_v3/group_map.cpp | 2 +- code/ryzom/client/src/interface_v3/group_map.h | 2 +- .../src/interface_v3/group_modal_get_key.cpp | 2 +- .../client/src/interface_v3/group_paragraph.h | 2 +- .../client/src/interface_v3/group_scrolltext.cpp | 2 +- code/ryzom/client/src/interface_v3/group_table.h | 2 +- .../client/src/interface_v3/interface_ddx.cpp | 2 +- .../client/src/interface_v3/interface_manager.cpp | 2 +- .../client/src/interface_v3/interface_parser.cpp | 2 +- .../ryzom/client/src/interface_v3/macrocmd_key.cpp | 2 +- .../client/src/interface_v3/macrocmd_manager.cpp | 2 +- .../src/interface_v3/people_interraction.cpp | 2 +- .../interface_v3/register_interface_elements.cpp | 2 +- .../client/src/interface_v3/task_bar_manager.cpp | 2 +- code/ryzom/client/src/login.cpp | 2 +- 30 files changed, 31 insertions(+), 40 deletions(-) rename code/{ryzom/client/src/interface_v3 => nel/include/nel/gui}/ctrl_button.h (95%) rename code/{ryzom/client/src/interface_v3 => nel/src/gui}/ctrl_button.cpp (90%) diff --git a/code/ryzom/client/src/interface_v3/ctrl_button.h b/code/nel/include/nel/gui/ctrl_button.h similarity index 95% rename from code/ryzom/client/src/interface_v3/ctrl_button.h rename to code/nel/include/nel/gui/ctrl_button.h index 64b8ecab0..dbeb8fa0a 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_button.h +++ b/code/nel/include/nel/gui/ctrl_button.h @@ -26,7 +26,6 @@ namespace NLGUI { class CEventDescriptor; } -class CInterfaceManager; /** * diff --git a/code/ryzom/client/src/interface_v3/ctrl_button.cpp b/code/nel/src/gui/ctrl_button.cpp similarity index 90% rename from code/ryzom/client/src/interface_v3/ctrl_button.cpp rename to code/nel/src/gui/ctrl_button.cpp index ec8db869d..6be493cf8 100644 --- a/code/ryzom/client/src/interface_v3/ctrl_button.cpp +++ b/code/nel/src/gui/ctrl_button.cpp @@ -16,12 +16,11 @@ -// ---------------------------------------------------------------------------- -#include "stdpch.h" -#include "ctrl_button.h" -#include "interface_manager.h" +#include "nel/gui/ctrl_button.h" #include "nel/misc/xml_auto_ptr.h" +#include "nel/gui/widget_manager.h" +#include "nel/gui/interface_group.h" // ---------------------------------------------------------------------------- using namespace std; @@ -106,7 +105,6 @@ void CCtrlButton::draw () sint32 nTxId = -1; CRGBA color; - CInterfaceManager *pIM = CInterfaceManager::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance(); CRGBA globalColor= CWidgetManager::getInstance()->getGlobalColorForContent(); @@ -248,7 +246,6 @@ void CCtrlButton::updateCoords() { if (!_Scale) { - CInterfaceManager *pIM = CInterfaceManager::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance(); sint32 txw, txh; rVR.getTextureSizeFromId (_TextureIdNormal, txw, txh); @@ -285,7 +282,6 @@ void CCtrlButton::setTextureOver(const std::string&name) // ---------------------------------------------------------------------------- std::string CCtrlButton::getTexture() const { - CInterfaceManager *pIM = CInterfaceManager::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance(); return rVR.getTextureNameFromId(_TextureIdNormal); } @@ -293,7 +289,6 @@ std::string CCtrlButton::getTexture() const // ---------------------------------------------------------------------------- std::string CCtrlButton::getTexturePushed() const { - CInterfaceManager *pIM = CInterfaceManager::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance(); return rVR.getTextureNameFromId(_TextureIdPushed); } @@ -301,7 +296,6 @@ std::string CCtrlButton::getTexturePushed() const // ---------------------------------------------------------------------------- std::string CCtrlButton::getTextureOver() const { - CInterfaceManager *pIM = CInterfaceManager::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance(); return rVR.getTextureNameFromId(_TextureIdOver); } @@ -310,7 +304,6 @@ std::string CCtrlButton::getTextureOver() const sint32 CCtrlButton::getMaxUsedW() const { sint32 txw, txh; - CInterfaceManager *pIM = CInterfaceManager::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance(); rVR.getTextureSizeFromId (_TextureIdNormal, txw, txh); return txw; @@ -325,7 +318,6 @@ sint32 CCtrlButton::getMinUsedW() const // *************************************************************************** void CCtrlButton::fitTexture() { - CInterfaceManager *pIM = CInterfaceManager::getInstance(); CViewRenderer &rVR = *CViewRenderer::getInstance(); sint32 w, h; rVR.getTextureSizeFromId(_TextureIdNormal, w, h); diff --git a/code/ryzom/client/src/connection.cpp b/code/ryzom/client/src/connection.cpp index 1da19926a..0bf8c8222 100644 --- a/code/ryzom/client/src/connection.cpp +++ b/code/ryzom/client/src/connection.cpp @@ -64,7 +64,7 @@ // Interface part #include "interface_v3/interface_manager.h" #include "interface_v3/character_3d.h" -#include "interface_v3/ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "interface_v3/input_handler_manager.h" #include "interface_v3/group_editbox.h" #include "nel/gui/interface_expr.h" diff --git a/code/ryzom/client/src/interface_v3/action_handler_game.cpp b/code/ryzom/client/src/interface_v3/action_handler_game.cpp index ddaad5b5e..9de7ed7c4 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_game.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_game.cpp @@ -83,7 +83,7 @@ // Game Config #include "dbgroup_combo_box.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "../global.h" using namespace std; diff --git a/code/ryzom/client/src/interface_v3/action_handler_misc.cpp b/code/ryzom/client/src/interface_v3/action_handler_misc.cpp index 5c3fb746a..dfbbeafc3 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_misc.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_misc.cpp @@ -17,7 +17,7 @@ #include "action_handler_misc.h" #include "interface_manager.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "group_container.h" #include "group_editbox.h" #include "people_interraction.h" diff --git a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp index a4cefa3bb..8c60170b2 100644 --- a/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/action_handler_phrase.cpp @@ -34,7 +34,7 @@ #include "group_container.h" #include "sphrase_manager.h" #include "sbrick_manager.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "../user_entity.h" #include "skill_manager.h" #include "inventory_manager.h" diff --git a/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.cpp b/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.cpp index d6ee00ef1..521fd3605 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_build_phrase.cpp @@ -23,7 +23,7 @@ #include "interface_manager.h" #include "dbctrl_sheet.h" #include "view_bitmap.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "group_editbox.h" #include "../client_cfg.h" #include "view_text.h" diff --git a/code/ryzom/client/src/interface_v3/dbgroup_combo_box.cpp b/code/ryzom/client/src/interface_v3/dbgroup_combo_box.cpp index 5dfa3810e..b861cee1d 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_combo_box.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_combo_box.cpp @@ -21,7 +21,7 @@ #include "group_menu.h" #include "nel/misc/xml_auto_ptr.h" #include "interface_manager.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "nel/gui/action_handler.h" #include "nel/gui/lua_ihm.h" diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp index 77d234b12..c6b9f7a23 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet.cpp @@ -21,7 +21,7 @@ #include "dbgroup_list_sheet.h" #include "group_container.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "nel/gui/interface_property.h" #include "interface_manager.h" #include "nel/gui/action_handler.h" diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp index 61687b4f7..1ec3d9420 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_text.cpp @@ -22,7 +22,7 @@ #include "interface_manager.h" #include "nel/misc/xml_auto_ptr.h" #include "../sheet_manager.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "view_text.h" #include "nel/gui/action_handler.h" #include "../time_client.h" diff --git a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp index 04c40f9d5..defdeff6c 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_list_sheet_trade.cpp @@ -22,7 +22,7 @@ #include "inventory_manager.h" #include "nel/misc/xml_auto_ptr.h" #include "../sheet_manager.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "view_text.h" #include "nel/gui/action_handler.h" #include "sphrase_manager.h" diff --git a/code/ryzom/client/src/interface_v3/dbgroup_select_number.cpp b/code/ryzom/client/src/interface_v3/dbgroup_select_number.cpp index 69440ff5a..02e44236e 100644 --- a/code/ryzom/client/src/interface_v3/dbgroup_select_number.cpp +++ b/code/ryzom/client/src/interface_v3/dbgroup_select_number.cpp @@ -23,7 +23,7 @@ #include "dbgroup_select_number.h" #include "view_text.h" #include "view_bitmap.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "nel/gui/interface_property.h" #include "interface_manager.h" #include "nel/gui/action_handler.h" diff --git a/code/ryzom/client/src/interface_v3/group_container.cpp b/code/ryzom/client/src/interface_v3/group_container.cpp index 907d08553..dcc8b2a4d 100644 --- a/code/ryzom/client/src/interface_v3/group_container.cpp +++ b/code/ryzom/client/src/interface_v3/group_container.cpp @@ -32,7 +32,7 @@ #include "nel/gui/lua_ihm.h" #include "group_list.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "ctrl_scroll.h" #include "view_text.h" #include "view_bitmap.h" diff --git a/code/ryzom/client/src/interface_v3/group_html.cpp b/code/ryzom/client/src/interface_v3/group_html.cpp index 950990e82..254a2a2c9 100644 --- a/code/ryzom/client/src/interface_v3/group_html.cpp +++ b/code/ryzom/client/src/interface_v3/group_html.cpp @@ -33,7 +33,7 @@ extern "C" #include "group_container.h" #include "view_link.h" #include "ctrl_scroll.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "dbctrl_sheet.h" #include "ctrl_text_button.h" #include "nel/gui/action_handler.h" diff --git a/code/ryzom/client/src/interface_v3/group_html.h b/code/ryzom/client/src/interface_v3/group_html.h index 5d5fc9041..7990baa61 100644 --- a/code/ryzom/client/src/interface_v3/group_html.h +++ b/code/ryzom/client/src/interface_v3/group_html.h @@ -27,7 +27,7 @@ #include "nel/gui/interface_group.h" #include "group_scrolltext.h" #include "group_tree.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "group_table.h" typedef std::map TStyle; diff --git a/code/ryzom/client/src/interface_v3/group_map.cpp b/code/ryzom/client/src/interface_v3/group_map.cpp index 99bf1edf6..01aabff64 100644 --- a/code/ryzom/client/src/interface_v3/group_map.cpp +++ b/code/ryzom/client/src/interface_v3/group_map.cpp @@ -24,7 +24,7 @@ #include "../continent.h" #include "../zone_util.h" #include "../user_entity.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "group_editbox.h" #include "../string_manager_client.h" #include "group_container.h" diff --git a/code/ryzom/client/src/interface_v3/group_map.h b/code/ryzom/client/src/interface_v3/group_map.h index a4d162068..a276e5a5b 100644 --- a/code/ryzom/client/src/interface_v3/group_map.h +++ b/code/ryzom/client/src/interface_v3/group_map.h @@ -26,7 +26,7 @@ #include "../client_sheets/world_sheet.h" #include "nel/gui/interface_group.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "view_bitmap.h" #include "view_text.h" #include "animal_position_state.h" diff --git a/code/ryzom/client/src/interface_v3/group_modal_get_key.cpp b/code/ryzom/client/src/interface_v3/group_modal_get_key.cpp index 06845d30f..d73729f03 100644 --- a/code/ryzom/client/src/interface_v3/group_modal_get_key.cpp +++ b/code/ryzom/client/src/interface_v3/group_modal_get_key.cpp @@ -20,7 +20,7 @@ #include "group_modal_get_key.h" #include "interface_manager.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "nel/misc/events.h" diff --git a/code/ryzom/client/src/interface_v3/group_paragraph.h b/code/ryzom/client/src/interface_v3/group_paragraph.h index f2c38bd05..d73174a90 100644 --- a/code/ryzom/client/src/interface_v3/group_paragraph.h +++ b/code/ryzom/client/src/interface_v3/group_paragraph.h @@ -23,7 +23,7 @@ #include "nel/gui/group_frame.h" #include "view_text.h" #include "view_link.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" class CCtrlLink : public CCtrlButton { diff --git a/code/ryzom/client/src/interface_v3/group_scrolltext.cpp b/code/ryzom/client/src/interface_v3/group_scrolltext.cpp index c3321e185..411b3714f 100644 --- a/code/ryzom/client/src/interface_v3/group_scrolltext.cpp +++ b/code/ryzom/client/src/interface_v3/group_scrolltext.cpp @@ -24,7 +24,7 @@ #include "group_list.h" #include "view_text.h" #include "ctrl_scroll.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "nel/gui/action_handler.h" #include "../time_client.h" diff --git a/code/ryzom/client/src/interface_v3/group_table.h b/code/ryzom/client/src/interface_v3/group_table.h index f4aa0b8fd..7c7ac640e 100644 --- a/code/ryzom/client/src/interface_v3/group_table.h +++ b/code/ryzom/client/src/interface_v3/group_table.h @@ -23,7 +23,7 @@ #include "nel/gui/group_frame.h" #include "view_text.h" #include "view_link.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" /** * This group is used to simulate HTML cells. diff --git a/code/ryzom/client/src/interface_v3/interface_ddx.cpp b/code/ryzom/client/src/interface_v3/interface_ddx.cpp index 5447ea2cd..bf4c23515 100644 --- a/code/ryzom/client/src/interface_v3/interface_ddx.cpp +++ b/code/ryzom/client/src/interface_v3/interface_ddx.cpp @@ -21,7 +21,7 @@ #include "interface_manager.h" #include "interface_ddx.h" #include "nel/gui/action_handler.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "nel/gui/group_modal.h" #include "../client_cfg.h" diff --git a/code/ryzom/client/src/interface_v3/interface_manager.cpp b/code/ryzom/client/src/interface_v3/interface_manager.cpp index 067c946ea..53af9d8e4 100644 --- a/code/ryzom/client/src/interface_v3/interface_manager.cpp +++ b/code/ryzom/client/src/interface_v3/interface_manager.cpp @@ -52,7 +52,7 @@ #include "view_text.h" // Ctrl #include "ctrl_scroll.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "ctrl_text_button.h" // DBCtrl #include "dbctrl_sheet.h" diff --git a/code/ryzom/client/src/interface_v3/interface_parser.cpp b/code/ryzom/client/src/interface_v3/interface_parser.cpp index a8b42df12..73d1208b8 100644 --- a/code/ryzom/client/src/interface_v3/interface_parser.cpp +++ b/code/ryzom/client/src/interface_v3/interface_parser.cpp @@ -53,7 +53,7 @@ #include "dbview_digit.h" // Ctrl #include "ctrl_scroll.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "ctrl_col_pick.h" #include "ctrl_tooltip.h" #include "ctrl_text_button.h" diff --git a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp b/code/ryzom/client/src/interface_v3/macrocmd_key.cpp index 1b91b3dd4..8eb74210a 100644 --- a/code/ryzom/client/src/interface_v3/macrocmd_key.cpp +++ b/code/ryzom/client/src/interface_v3/macrocmd_key.cpp @@ -24,7 +24,7 @@ #include "interface_manager.h" #include "nel/gui/action_handler.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "group_editbox.h" #include "group_list.h" #include "dbgroup_combo_box.h" diff --git a/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp b/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp index 679fa5900..e66fc16d7 100644 --- a/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp +++ b/code/ryzom/client/src/interface_v3/macrocmd_manager.cpp @@ -25,7 +25,7 @@ #include "interface_manager.h" #include "nel/gui/action_handler.h" #include "dbctrl_sheet.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "group_editbox.h" #include "group_list.h" #include "dbgroup_combo_box.h" diff --git a/code/ryzom/client/src/interface_v3/people_interraction.cpp b/code/ryzom/client/src/interface_v3/people_interraction.cpp index ead0fe307..ee20006ce 100644 --- a/code/ryzom/client/src/interface_v3/people_interraction.cpp +++ b/code/ryzom/client/src/interface_v3/people_interraction.cpp @@ -31,7 +31,7 @@ #include "../client_chat_manager.h" #include "../string_manager_client.h" #include "nel/gui/interface_expr.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "ctrl_text_button.h" #include "filtered_chat_summary.h" #include "input_handler_manager.h" diff --git a/code/ryzom/client/src/interface_v3/register_interface_elements.cpp b/code/ryzom/client/src/interface_v3/register_interface_elements.cpp index 196497e65..bb9d482a8 100644 --- a/code/ryzom/client/src/interface_v3/register_interface_elements.cpp +++ b/code/ryzom/client/src/interface_v3/register_interface_elements.cpp @@ -32,7 +32,7 @@ #include "group_container.h" #include "group_list.h" #include "dbgroup_select_number.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "ctrl_text_button.h" #include "ctrl_col_pick.h" #include "nel/gui/ctrl_draggable.h" diff --git a/code/ryzom/client/src/interface_v3/task_bar_manager.cpp b/code/ryzom/client/src/interface_v3/task_bar_manager.cpp index 5b780aa9f..0edece1a1 100644 --- a/code/ryzom/client/src/interface_v3/task_bar_manager.cpp +++ b/code/ryzom/client/src/interface_v3/task_bar_manager.cpp @@ -27,7 +27,7 @@ #include "nel/gui/action_handler.h" #include "group_container.h" #include "../actions_client.h" -#include "ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "interface_options_ryzom.h" diff --git a/code/ryzom/client/src/login.cpp b/code/ryzom/client/src/login.cpp index e730942d3..c981f083f 100644 --- a/code/ryzom/client/src/login.cpp +++ b/code/ryzom/client/src/login.cpp @@ -38,7 +38,7 @@ #include "interface_v3/group_editbox.h" #include "interface_v3/group_quick_help.h" #include "interface_v3/view_text.h" -#include "interface_v3/ctrl_button.h" +#include "nel/gui/ctrl_button.h" #include "interface_v3/ctrl_text_button.h" #include "sound_manager.h" #include "far_tp.h"