Merging latest GUI lib changes.
This commit is contained in:
commit
4f6f3104d5
5 changed files with 156 additions and 107 deletions
31
code/nel/include/nel/gui/reflect_register.h
Normal file
31
code/nel/include/nel/gui/reflect_register.h
Normal file
|
@ -0,0 +1,31 @@
|
|||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// 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 Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
#ifndef REFLECT_REG_H
|
||||
#define REFLECT_REG_H
|
||||
|
||||
namespace NLGUI
|
||||
{
|
||||
class CReflectableRegister
|
||||
{
|
||||
public:
|
||||
static void registerClasses();
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
#endif
|
92
code/nel/src/gui/reflect_register.cpp
Normal file
92
code/nel/src/gui/reflect_register.cpp
Normal file
|
@ -0,0 +1,92 @@
|
|||
// Ryzom - MMORPG Framework <http://dev.ryzom.com/projects/ryzom/>
|
||||
// Copyright (C) 2010 Winch Gate Property Limited
|
||||
//
|
||||
// This program is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU Affero General Public License as
|
||||
// published by the Free Software Foundation, either version 3 of the
|
||||
// License, or (at your option) any later version.
|
||||
//
|
||||
// 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 Affero General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU Affero General Public License
|
||||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
#include "nel/gui/reflect_register.h"
|
||||
|
||||
#include "nel/gui/interface_element.h"
|
||||
#include "nel/gui/view_base.h"
|
||||
#include "nel/gui/view_text.h"
|
||||
#include "nel/gui/view_text_id.h"
|
||||
#include "nel/gui/view_bitmap.h"
|
||||
#include "nel/gui/group_submenu_base.h"
|
||||
#include "nel/gui/group_menu.h"
|
||||
#include "nel/gui/ctrl_base.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/group_frame.h"
|
||||
#include "nel/gui/group_container_base.h"
|
||||
#include "nel/gui/group_container.h"
|
||||
#include "nel/gui/group_list.h"
|
||||
#include "nel/gui/dbgroup_select_number.h"
|
||||
#include "nel/gui/ctrl_button.h"
|
||||
#include "nel/gui/ctrl_text_button.h"
|
||||
#include "nel/gui/ctrl_col_pick.h"
|
||||
#include "nel/gui/ctrl_draggable.h"
|
||||
#include "nel/gui/group_editbox_base.h"
|
||||
#include "nel/gui/group_editbox.h"
|
||||
#include "nel/gui/group_tree.h"
|
||||
#include "nel/gui/reflect.h"
|
||||
#include "nel/gui/dbview_bar.h"
|
||||
#include "nel/gui/dbview_bar3.h"
|
||||
#include "nel/gui/ctrl_scroll_base.h"
|
||||
#include "nel/gui/ctrl_scroll.h"
|
||||
#include "nel/gui/dbgroup_combo_box.h"
|
||||
#include "nel/gui/group_tab.h"
|
||||
#include "nel/gui/group_html.h"
|
||||
#include "nel/gui/group_header.h"
|
||||
|
||||
namespace NLGUI
|
||||
{
|
||||
void CReflectableRegister::registerClasses()
|
||||
{
|
||||
REGISTER_REFLECTABLE_CLASS(CInterfaceElement, CReflectable);
|
||||
REGISTER_REFLECTABLE_CLASS(CViewBase, CInterfaceElement);
|
||||
REGISTER_REFLECTABLE_CLASS(CViewText, CViewBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CViewTextID, CViewText);
|
||||
REGISTER_REFLECTABLE_CLASS(CViewBitmap, CViewBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CViewTextMenu, CViewText);
|
||||
REGISTER_REFLECTABLE_CLASS(CDBViewBar, CViewBitmap);
|
||||
REGISTER_REFLECTABLE_CLASS(CDBViewBar3, CViewBitmap);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlBase, CViewBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlBaseButton, CCtrlBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlButton, CCtrlBaseButton);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlTextButton, CCtrlBaseButton);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlColPick, CCtrlBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlDraggable, CCtrlBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CInterfaceGroup, CCtrlBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupFrame, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupModal, CGroupFrame);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupContainerBase, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupContainer, CGroupContainerBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CDBGroupSelectNumber, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupEditBoxBase, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupEditBox, CGroupEditBoxBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupTree, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CDBGroupComboBox, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlScrollBase, CCtrlBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlScroll, CCtrlScrollBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupMenu, CGroupModal);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupSubMenuBase, CGroupFrame);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupSubMenu, CGroupSubMenuBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupTab, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupScrollText, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupHTML, CGroupScrollText);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupTree::SNode, CReflectable);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupList, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupHeader, CGroupList);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -30,6 +30,7 @@
|
|||
#include "nel/gui/interface_anim.h"
|
||||
#include "nel/gui/proc.h"
|
||||
#include "nel/gui/interface_expr.h"
|
||||
#include "nel/gui/reflect_register.h"
|
||||
#include "nel/misc/events.h"
|
||||
|
||||
namespace NLGUI
|
||||
|
@ -3092,6 +3093,8 @@ namespace NLGUI
|
|||
|
||||
CWidgetManager::CWidgetManager()
|
||||
{
|
||||
CReflectableRegister::registerClasses();
|
||||
|
||||
parser = IParser::createParser();
|
||||
|
||||
_Pointer = NULL;
|
||||
|
|
|
@ -74,21 +74,21 @@ namespace GUIEditor
|
|||
browserCtrl.setBrowser( tb );
|
||||
browserCtrl.setup();
|
||||
dock->setWidget( tb );
|
||||
addDockWidget( Qt::RightDockWidgetArea, dock );
|
||||
|
||||
addDockWidget( Qt::RightDockWidgetArea, dock );
|
||||
|
||||
CWidgetManager::getInstance();
|
||||
NLMISC::CPath::addSearchPath( "z:/ryzom/data", true, false, NULL );
|
||||
NLMISC::CPath::remapExtension ("dds", "tga", true);
|
||||
NLMISC::CPath::remapExtension ("dds", "png", true);
|
||||
NLMISC::CPath::remapExtension ("png", "tga", true);
|
||||
|
||||
NLGUI::_UIStringMapper =
|
||||
NLMISC::CStringMapper::createLocalMapper();
|
||||
|
||||
NL3D::UDriver *driver = NL3D::UDriver::createDriver();
|
||||
CViewRenderer::setDriver( driver );
|
||||
CViewRenderer::setTextContext( driver->createTextContext( NLMISC::CPath::lookup( "ryzom.ttf" ) ) );
|
||||
hwCurs.insert( "curs_default.tga" );
|
||||
NLMISC::CPath::remapExtension ("dds", "tga", true);
|
||||
NLMISC::CPath::remapExtension ("dds", "png", true);
|
||||
NLMISC::CPath::remapExtension ("png", "tga", true);
|
||||
|
||||
NLGUI::_UIStringMapper =
|
||||
NLMISC::CStringMapper::createLocalMapper();
|
||||
|
||||
NL3D::UDriver *driver = NL3D::UDriver::createDriver();
|
||||
CViewRenderer::setDriver( driver );
|
||||
CViewRenderer::setTextContext( driver->createTextContext( NLMISC::CPath::lookup( "ryzom.ttf" ) ) );
|
||||
hwCurs.insert( "curs_default.tga" );
|
||||
CViewRenderer::hwCursors = &hwCurs;
|
||||
CViewRenderer::getInstance();
|
||||
}
|
||||
|
@ -132,19 +132,19 @@ namespace GUIEditor
|
|||
|
||||
|
||||
void GUIEditorWindow::parse()
|
||||
{
|
||||
std::vector< std::string > files;
|
||||
files.push_back( "login_config.xml" );
|
||||
files.push_back( "login_widgets.xml" );
|
||||
files.push_back( "login_main.xml" );
|
||||
files.push_back( "login_keys.xml" );
|
||||
|
||||
CViewRenderer::getInstance()->loadTextures(
|
||||
"texture_interfaces_v3_login.tga",
|
||||
"texture_interfaces_v3_login.txt",
|
||||
false );
|
||||
|
||||
setCursor( Qt::WaitCursor );
|
||||
{
|
||||
std::vector< std::string > files;
|
||||
files.push_back( "login_config.xml" );
|
||||
files.push_back( "login_widgets.xml" );
|
||||
files.push_back( "login_main.xml" );
|
||||
files.push_back( "login_keys.xml" );
|
||||
|
||||
CViewRenderer::getInstance()->loadTextures(
|
||||
"texture_interfaces_v3_login.tga",
|
||||
"texture_interfaces_v3_login.txt",
|
||||
false );
|
||||
|
||||
setCursor( Qt::WaitCursor );
|
||||
CWidgetManager::getInstance()->getParser()->parseInterface( files, false );
|
||||
setCursor( Qt::ArrowCursor );
|
||||
}
|
||||
|
@ -165,9 +165,9 @@ namespace GUIEditor
|
|||
|
||||
a = new QAction( "Proc Editor", this );
|
||||
connect( a, SIGNAL( triggered( bool ) ), procEditor, SLOT( show() ) );
|
||||
menu->addAction( a );
|
||||
|
||||
a = new QAction( "parse", this );
|
||||
menu->addAction( a );
|
||||
|
||||
a = new QAction( "parse", this );
|
||||
connect( a, SIGNAL( triggered( bool ) ), this, SLOT( parse() ) );
|
||||
menu->addAction( a );
|
||||
}
|
||||
|
|
|
@ -15,96 +15,27 @@
|
|||
// along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
|
||||
|
||||
#include "stdpch.h"
|
||||
#include "nel/gui/interface_element.h"
|
||||
#include "interface_3d_scene.h"
|
||||
#include "nel/gui/view_base.h"
|
||||
#include "nel/gui/view_text.h"
|
||||
#include "nel/gui/view_text_id.h"
|
||||
#include "nel/gui/view_bitmap.h"
|
||||
#include "view_radar.h"
|
||||
#include "nel/gui/group_submenu_base.h"
|
||||
#include "nel/gui/group_menu.h"
|
||||
#include "nel/gui/ctrl_base.h"
|
||||
#include "nel/gui/interface_group.h"
|
||||
#include "nel/gui/group_frame.h"
|
||||
#include "nel/gui/group_container_base.h"
|
||||
#include "nel/gui/group_container.h"
|
||||
#include "nel/gui/group_list.h"
|
||||
#include "nel/gui/dbgroup_select_number.h"
|
||||
#include "nel/gui/ctrl_button.h"
|
||||
#include "nel/gui/ctrl_text_button.h"
|
||||
#include "nel/gui/ctrl_col_pick.h"
|
||||
#include "nel/gui/ctrl_draggable.h"
|
||||
#include "dbctrl_sheet.h"
|
||||
#include "dbgroup_list_sheet.h"
|
||||
#include "nel/gui/group_editbox_base.h"
|
||||
#include "nel/gui/group_editbox.h"
|
||||
#include "nel/gui/group_tree.h"
|
||||
#include "nel/gui/reflect.h"
|
||||
#include "nel/gui/dbview_bar.h"
|
||||
#include "nel/gui/dbview_bar3.h"
|
||||
#include "nel/gui/ctrl_scroll_base.h"
|
||||
#include "nel/gui/ctrl_scroll.h"
|
||||
#include "nel/gui/dbgroup_combo_box.h"
|
||||
#include "nel/gui/group_tab.h"
|
||||
#include "nel/gui/group_html.h"
|
||||
#include "nel/gui/group_header.h"
|
||||
#include "sphrase_manager.h"
|
||||
//
|
||||
#include "../r2/displayer_visual.h"
|
||||
#include "../r2/displayer_visual_entity.h"
|
||||
#include "../r2/displayer_visual_group.h"
|
||||
#include "../r2/instance.h"
|
||||
#include "../r2/tool.h"
|
||||
#include "../r2/tool_pick.h"
|
||||
|
||||
#include "view_pointer_ryzom.h"
|
||||
|
||||
|
||||
#include "nel/gui/reflect_register.h"
|
||||
|
||||
void registerInterfaceElements()
|
||||
{
|
||||
CViewPointerRyzom::forceLinking();
|
||||
|
||||
REGISTER_REFLECTABLE_CLASS(CInterfaceElement, CReflectable);
|
||||
REGISTER_REFLECTABLE_CLASS(CViewBase, CInterfaceElement);
|
||||
REGISTER_REFLECTABLE_CLASS(CViewText, CViewBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CViewTextID, CViewText);
|
||||
REGISTER_REFLECTABLE_CLASS(CViewBitmap, CViewBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CViewRadar, CViewBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CViewTextMenu, CViewText);
|
||||
REGISTER_REFLECTABLE_CLASS(CDBViewBar, CViewBitmap);
|
||||
REGISTER_REFLECTABLE_CLASS(CDBViewBar3, CViewBitmap);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlBase, CViewBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlBaseButton, CCtrlBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlButton, CCtrlBaseButton);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlTextButton, CCtrlBaseButton);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlColPick, CCtrlBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlDraggable, CCtrlBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CDBCtrlSheet, CCtrlDraggable);
|
||||
REGISTER_REFLECTABLE_CLASS(CInterfaceGroup, CCtrlBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupFrame, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupModal, CGroupFrame);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupContainerBase, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupContainer, CGroupContainerBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CDBGroupSelectNumber, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(IListSheetBase, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupEditBoxBase, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupEditBox, CGroupEditBoxBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupTree, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CDBGroupComboBox, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlScrollBase, CCtrlBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CCtrlScroll, CCtrlScrollBase);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupMenu, CGroupModal)
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupSubMenuBase, CGroupFrame)
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupSubMenu, CGroupSubMenuBase)
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupTab, CInterfaceGroup)
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupScrollText, CInterfaceGroup)
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupHTML, CGroupScrollText)
|
||||
|
||||
|
||||
REGISTER_REFLECTABLE_CLASS(CInterface3DScene, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CInterface3DCharacter, CInterfaceElement);
|
||||
REGISTER_REFLECTABLE_CLASS(CInterface3DIG, CInterfaceElement);
|
||||
|
@ -112,12 +43,6 @@ void registerInterfaceElements()
|
|||
REGISTER_REFLECTABLE_CLASS(CInterface3DCamera, CInterfaceElement);
|
||||
REGISTER_REFLECTABLE_CLASS(CInterface3DLight, CInterfaceElement);
|
||||
REGISTER_REFLECTABLE_CLASS(CInterface3DFX, CInterfaceElement);
|
||||
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupTree::SNode, CReflectable);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupList, CInterfaceGroup);
|
||||
REGISTER_REFLECTABLE_CLASS(CGroupHeader, CGroupList);
|
||||
|
||||
|
||||
REGISTER_REFLECTABLE_CLASS(R2::CInstance, CReflectable);
|
||||
REGISTER_REFLECTABLE_CLASS(R2::CDisplayerBase, CReflectable);
|
||||
REGISTER_REFLECTABLE_CLASS(R2::CDisplayerVisual, R2::CDisplayerBase);
|
||||
|
@ -125,9 +50,7 @@ void registerInterfaceElements()
|
|||
REGISTER_REFLECTABLE_CLASS(R2::CDisplayerVisualGroup, R2::CDisplayerVisual);
|
||||
REGISTER_REFLECTABLE_CLASS(R2::CTool, CReflectable);
|
||||
REGISTER_REFLECTABLE_CLASS(R2::CToolPick, R2::CTool);
|
||||
|
||||
REGISTER_REFLECTABLE_CLASS(CSPhraseComAdpater, CReflectable);
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in a new issue