找回密码
 register

QQ登录

只需一步,快速开始

查看: 880|回复: 0

客户端:每个控件的注册对象函数参考

[复制链接]

客户端:每个控件的注册对象函数参考

[复制链接]
  • 打卡等级:热心大叔
  • 打卡总天数:94
  • 打卡月天数:17
  • 打卡总奖励:94
  • 最近打卡:2025-01-18 01:28:20
Waylee

主题

0

回帖

1万

积分

仙帝

积分
11931
Waylee 2020-8-8 14:24 | 显示全部楼层 |阅读模式

马上注册,查看网站隐藏内容!!

您需要 登录 才可以下载或查看,没有账号?register

×

        //-----------------------------------------------------------
        //0. Window
        Window::s_pMetaTable = new LuaPlus::LuaObject;
        *Window::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_Window");
        Window::s_pMetaTable->SetObject("__index", *Window::s_pMetaTable);

        Window::s_pMetaTable->RegisterObjectFunctor("SetProperty", &Window::setProperty);
        Window::s_pMetaTable->RegisterObjectFunctor("GetProperty", &Window::getProperty);
        Window::s_pMetaTable->RegisterObjectFunctor("GetType"        , &Window::getType);
        Window::s_pMetaTable->RegisterObjectFunctor("GetName"        , &Window::getName);
        Window::s_pMetaTable->RegisterObjectFunctor("GetText"        , &Window::getText);
        Window::s_pMetaTable->RegisterObjectFunctor("SetText"        , &Window::setText);
        Window::s_pMetaTable->RegisterObjectFunctor("SetTextOriginal"        , &Window::setTextOriginal);
        Window::s_pMetaTable->RegisterObjectFunctor("TransText"        , &Window::TransText);
        Window::s_pMetaTable->RegisterObjectFunctor("Show"                , &Window::Show);
        Window::s_pMetaTable->RegisterObjectFunctor("Hide"                , &Window::Hide);
        Window::s_pMetaTable->RegisterObjectFunctor("Disable"        , &Window::Disable);
        Window::s_pMetaTable->RegisterObjectFunctor("Enable"        , &Window::Enable);
        Window::s_pMetaTable->RegisterObjectFunctor("IsVisible"        , &Window::IsVisible);
        Window::s_pMetaTable->RegisterObjectFunctor("SetForce"        , &Window::setForce);
        Window::s_pMetaTable->RegisterObjectFunctor("SetToolTip", &Window::SetToolTip);
        Window::s_pMetaTable->RegisterObjectFunctor("CaptureInput", &Window::CaptureInput);
        Window::s_pMetaTable->RegisterObjectFunctor("CenterWindow", &Window::CenterWindow);
        Window::s_pMetaTable->RegisterObjectFunctor("SetWindowCenter", &Window::SetWindowCenter);
        Window::s_pMetaTable->RegisterObjectFunctor("SetClippedByParent", &Window::SetClippedByParent);
    Window::s_pMetaTable->RegisterObjectFunctor("AutoMousePosition", &Window::AutoMousePosition);
        

        //-----------------------------------------------------------
        //1. Progress
        ProgressBar::s_pMetaTable = new LuaPlus::LuaObject;
        *ProgressBar::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_ProgressBar");
        *ProgressBar::s_pMetaTable = *Window::s_pMetaTable;
        ProgressBar::s_pMetaTable->SetObject("__index", *ProgressBar::s_pMetaTable);

        ProgressBar::s_pMetaTable->RegisterObjectFunctor("SetProgress"        , &ProgressBar::SetProgress);

        //-----------------------------------------------------------
        //2. ActionButton
        ActionButton::s_pMetaTable = new LuaPlus::LuaObject;
        *ActionButton::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_ActionButton");
        *ActionButton::s_pMetaTable = *Window::s_pMetaTable;
        ActionButton::s_pMetaTable->SetObject("__index", *ActionButton::s_pMetaTable);

        ActionButton::s_pMetaTable->RegisterObjectFunctor("SetActionItem"        , &ActionButton::Lua_SetActionItem);
        ActionButton::s_pMetaTable->RegisterObjectFunctor("DoAction"                , &ActionButton::Lua_DoAction);
        ActionButton::s_pMetaTable->RegisterObjectFunctor("DoSubAction"                , &ActionButton::Lua_DoSubAction);
        ActionButton::s_pMetaTable->RegisterObjectFunctor("SetPushed"                , &ActionButton::Lua_SetPushed);
        ActionButton::s_pMetaTable->RegisterObjectFunctor("SetFlash"                , &ActionButton::Lua_SetFlash);
        ActionButton::s_pMetaTable->RegisterObjectFunctor("Gloom"                        , &ActionButton::Lua_Gloom);
        ActionButton::s_pMetaTable->RegisterObjectFunctor("Bright"                        , &ActionButton::Lua_Bright);


        //-----------------------------------------------------------
        //3. PopMenu
        PopMenu::s_pMetaTable = new LuaPlus::LuaObject;
        *PopMenu::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_PopMenu");
        *PopMenu::s_pMetaTable = *Window::s_pMetaTable;
        PopMenu::s_pMetaTable->SetObject("__index", *PopMenu::s_pMetaTable);

        PopMenu::s_pMetaTable->RegisterObjectFunctor("OpenPopMenu"        ,        &PopMenu::OpenPopMenu);
        PopMenu::s_pMetaTable->RegisterObjectFunctor("ClosePopMenu"        ,        &PopMenu::ClosePopMenu);
        PopMenu::s_pMetaTable->RegisterObjectFunctor("SetPopMenuPos",        &PopMenu::SetPopMenuPos);

        //-----------------------------------------------------------
        //4. ComplexWindow
        ComplexWindow::s_pMetaTable = new LuaPlus::LuaObject;
        *ComplexWindow::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_ComplexWindow");
        *ComplexWindow::s_pMetaTable = *Window::s_pMetaTable;
        ComplexWindow::s_pMetaTable->SetObject("__index", *ComplexWindow::s_pMetaTable);

        ComplexWindow::s_pMetaTable->RegisterObjectFunctor("AddTextElement"        , &ComplexWindow::AddTextElement);
        ComplexWindow::s_pMetaTable->RegisterObjectFunctor("AddOptionElement"        , &ComplexWindow::AddOptionElement);
        ComplexWindow::s_pMetaTable->RegisterObjectFunctor("AddItemElement"        , &ComplexWindow::AddItemElement);
        ComplexWindow::s_pMetaTable->RegisterObjectFunctor("AddActionElement"        , &ComplexWindow::AddActionElement);
        ComplexWindow::s_pMetaTable->RegisterObjectFunctor("AddMoneyElement"        , &ComplexWindow::AddMoneyElement);
        ComplexWindow::s_pMetaTable->RegisterObjectFunctor("AddImpactElement"        , &ComplexWindow::AddImpactElement);
        ComplexWindow::s_pMetaTable->RegisterObjectFunctor("ClearAllElement"        , &ComplexWindow::CleanAllElement);
        ComplexWindow::s_pMetaTable->RegisterObjectFunctor("SetTextColour"        , &ComplexWindow::SetTextColour);
        ComplexWindow::s_pMetaTable->RegisterObjectFunctor("PageEnd"        , &ComplexWindow::PageEnd);

        //-----------------------------------------------------------
        //5.Minimap
        Minimap::s_pMetaTable = new LuaPlus::LuaObject;
        *Minimap::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_Minimap");
        *Minimap::s_pMetaTable = *Window::s_pMetaTable;
        Minimap::s_pMetaTable->SetObject("__index", *Minimap::s_pMetaTable);

        Minimap::s_pMetaTable->RegisterObjectFunctor( "UpdateFlag", &Minimap::UpdateFlag);

        //-----------------------------------------------------------
        //6. ListBox
        ListBox::s_pMetaTable = new LuaPlus::LuaObject;
        *ListBox::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_Listbox");
        *ListBox::s_pMetaTable = *Window::s_pMetaTable;
        ListBox::s_pMetaTable->SetObject("__index", *ListBox::s_pMetaTable);

        ListBox::s_pMetaTable->RegisterObjectFunctor( "SetItemTooltip", &ListBox::SetItemTooltip );
        ListBox::s_pMetaTable->RegisterObjectFunctor( "AddItem", &ListBox::AddItem );
        ListBox::s_pMetaTable->RegisterObjectFunctor( "SetListItemText", &ListBox::SetItemText );
        ListBox::s_pMetaTable->RegisterObjectFunctor( "GetItem", &ListBox::GetItem);
        ListBox::s_pMetaTable->RegisterObjectFunctor( "DelItem", &ListBox::DelItem);
        ListBox::s_pMetaTable->RegisterObjectFunctor( "ClearListBox", &ListBox::ClearListBox);
        ListBox::s_pMetaTable->RegisterObjectFunctor( "GetFirstSelectItem", &ListBox::GetFirstSelectItem);
        ListBox::s_pMetaTable->RegisterObjectFunctor( "SetItemSelect", &ListBox::SetItemSelect);
        ListBox::s_pMetaTable->RegisterObjectFunctor( "SetItemSelectByItemID", &ListBox::SetItemSelectByItemID);


        //-----------------------------------------------------------
        //7. ChatWindows

        //-----------------------------------------------------------
        //8. ChatInputWindow

        //-----------------------------------------------------------
        //9. ImageListBox
        ImageListBox::s_pMetaTable = new LuaPlus::LuaObject;
        *ImageListBox::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_ImageListbox");
        *ImageListBox::s_pMetaTable = *Window::s_pMetaTable;
        ImageListBox::s_pMetaTable->SetObject("__index", *ImageListBox::s_pMetaTable);

        ImageListBox::s_pMetaTable->RegisterObjectFunctor( "AddItem", &ImageListBox::AddItem );

        //-----------------------------------------------------------
        //10. ImageListBoxEx
        ImageListBoxEx::s_pMetaTable = new LuaPlus::LuaObject;
        *ImageListBoxEx::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_ImageListboxEx");
        *ImageListBoxEx::s_pMetaTable = *Window::s_pMetaTable;
        ImageListBoxEx::s_pMetaTable->SetObject("__index", *ImageListBoxEx::s_pMetaTable);

        ImageListBoxEx::s_pMetaTable->RegisterObjectFunctor( "AddItem", &ImageListBoxEx::AddItem );

        //-----------------------------------------------------------
        //11. CheckBox
        CheckButton::s_pMetaTable = new LuaPlus::LuaObject;
        *CheckButton::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_ImageCheckbox");
        *CheckButton::s_pMetaTable = *Window::s_pMetaTable;
        CheckButton::s_pMetaTable->SetObject("__index", *ImageListBoxEx::s_pMetaTable);

        CheckButton::s_pMetaTable->RegisterObjectFunctor( "SetCheck", &CheckButton::SetCheck );
        CheckButton::s_pMetaTable->RegisterObjectFunctor( "GetCheck", &CheckButton::GetCheck );

        //-----------------------------------------------------------
        //12. ComboBox
        ComboBox::s_pMetaTable = new LuaPlus::LuaObject;
        *ComboBox::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_ComboBox");
        *ComboBox::s_pMetaTable = *Window::s_pMetaTable;
        ComboBox::s_pMetaTable->SetObject("__index", *ComboBox::s_pMetaTable);

        ComboBox::s_pMetaTable->RegisterObjectFunctor( "ComboBoxAddItem", &ComboBox::ComboBoxAddItem);
        ComboBox::s_pMetaTable->RegisterObjectFunctor( "ResetList", &ComboBox::ResetList);
        ComboBox::s_pMetaTable->RegisterObjectFunctor( "GetCurrentSelect", &ComboBox::GetCurrentSelect);
        ComboBox::s_pMetaTable->RegisterObjectFunctor( "SetCurrentSelect", &ComboBox::SetCurrentSelect);
        //-----------------------------------------------------------
        //13. StaticImage
        StaticImage::s_pMetaTable = new LuaPlus::LuaObject;
        *StaticImage::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_StaticImage");
        *StaticImage::s_pMetaTable = *Window::s_pMetaTable;
        StaticImage::s_pMetaTable->SetObject("__index", *StaticImage::s_pMetaTable);

        StaticImage::s_pMetaTable->RegisterObjectFunctor( "SetImage", &StaticImage::SetImage);
        StaticImage::s_pMetaTable->RegisterObjectFunctor( "SetImageColor", &StaticImage::SetImageColor);

        //-----------------------------------------------------------
        //14. ScrollBar
        ScrollBar::s_pMetaTable = new LuaPlus::LuaObject;
        *ScrollBar::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_ScrollBar");
        *ScrollBar::s_pMetaTable = *Window::s_pMetaTable;
        ScrollBar::s_pMetaTable->SetObject("__index", *ScrollBar::s_pMetaTable);

        ScrollBar::s_pMetaTable->RegisterObjectFunctor( "SetPosition", &ScrollBar::SetPosition );
        ScrollBar::s_pMetaTable->RegisterObjectFunctor( "GetPosition", &ScrollBar::GetPosition );

        //-----------------------------------------------------------
        //15. SuperTooltip
        SuperTooltip::s_pMetaTable = new LuaPlus::LuaObject;
        *SuperTooltip::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_SuperTooltip");
        *SuperTooltip::s_pMetaTable = *Window::s_pMetaTable;
        SuperTooltip::s_pMetaTable->SetObject("__index", *SuperTooltip::s_pMetaTable);

        SuperTooltip::s_pMetaTable->RegisterObjectFunctor( "PositionSelf", &SuperTooltip::PositionSelf );

        //-----------------------------------------------------------
        //16. MeshWindow
        MeshWindow::s_pMetaTable = new LuaPlus::LuaObject;
        *MeshWindow::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_MeshWindow");
        *MeshWindow::s_pMetaTable = *Window::s_pMetaTable;
        MeshWindow::s_pMetaTable->SetObject("__index", *MeshWindow::s_pMetaTable);

        MeshWindow::s_pMetaTable->RegisterObjectFunctor("SetFakeObject", &MeshWindow::SetFakeObject );
        MeshWindow::s_pMetaTable->RegisterObjectFunctor("RotateBegin", &MeshWindow::RotateBegin );
        MeshWindow::s_pMetaTable->RegisterObjectFunctor("RotateEnd", &MeshWindow::RotateEnd );
        MeshWindow::s_pMetaTable->RegisterObjectFunctor("ChangeActionBegin", &MeshWindow::ChangeActionBegin );
        //-----------------------------------------------------------
        //17. ChatHistory
        ChatHistory::s_pMetaTable = new LuaPlus::LuaObject;
        *ChatHistory::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_ChatHistory");
        *ChatHistory::s_pMetaTable = *Window::s_pMetaTable;
        ChatHistory::s_pMetaTable->SetObject("__index", *ChatHistory::s_pMetaTable);

        ChatHistory::s_pMetaTable->RegisterObjectFunctor("InsertChatString", &ChatHistory::InsertChatString);
        ChatHistory::s_pMetaTable->RegisterObjectFunctor("RemoveAllChatString", &ChatHistory::RemoveAllChatString);
        ChatHistory::s_pMetaTable->RegisterObjectFunctor("ScrollToEnd", &ChatHistory::ScrollToEnd);
        ChatHistory::s_pMetaTable->RegisterObjectFunctor("ExtendClearRegion", &ChatHistory::ExtendClearRegion);

        //-----------------------------------------------------------
        //18. ChatChannel
        ChatChannel::s_pMetaTable = new LuaPlus::LuaObject;
        *ChatChannel::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_ChatChannel");
        *ChatChannel::s_pMetaTable = *Window::s_pMetaTable;
        ChatChannel::s_pMetaTable->SetObject("__index", *ChatChannel::s_pMetaTable);

        ChatChannel::s_pMetaTable->RegisterObjectFunctor("ClearAllChannel", &ChatChannel::ClearAllChannel);
        ChatChannel::s_pMetaTable->RegisterObjectFunctor("AddChannel", &ChatChannel::AddChannel);

        //-----------------------------------------------------------
        //19. Scenemap
        Scenemap::s_pMetaTable = new LuaPlus::LuaObject;
        *Scenemap::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_SceneMapWindow");
        *Scenemap::s_pMetaTable = *Window::s_pMetaTable;
        Scenemap::s_pMetaTable->SetObject("__index", *Scenemap::s_pMetaTable);

        
        Scenemap::s_pMetaTable->RegisterObjectFunctor("SetSceneFileName", &Scenemap::SetSceneFileName );
        Scenemap::s_pMetaTable->RegisterObjectFunctor("CloseSceneMap", &Scenemap::CloseSceneMap );
        Scenemap::s_pMetaTable->RegisterObjectFunctor("GetMouseScenePos", &Scenemap::GetMouseScenePos );
        Scenemap::s_pMetaTable->RegisterObjectFunctor("UpdateSceneMap", &Scenemap::UpdateSceneMap );
        Scenemap::s_pMetaTable->RegisterObjectFunctor("SetSceneZoomMode", &Scenemap::SetSceneZoomMode );
        Scenemap::s_pMetaTable->RegisterObjectFunctor("UpdateViewRect", &Scenemap::UpdateViewRect);

        //20. Worldmap
        Worldmap::s_pMetaTable = new LuaPlus::LuaObject;
        *Worldmap::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_WorldMapWindow");
        *Worldmap::s_pMetaTable = *Window::s_pMetaTable;
        Worldmap::s_pMetaTable->SetObject("__index", *Worldmap::s_pMetaTable);

        Scenemap::s_pMetaTable->RegisterObjectFunctor("InitWorldMap", &Worldmap::InitWorldMap );
        Scenemap::s_pMetaTable->RegisterObjectFunctor("GetCurrentSelectScene", &Worldmap::GetCurrentSelectScene );
        Scenemap::s_pMetaTable->RegisterObjectFunctor("UpdateWorldMap", &Worldmap::UpdateWorldMap );
        

        // 21. InfoList
        InfoList::s_pMetaTable = new LuaPlus::LuaObject;
        *InfoList::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_InfoListWindow");
        *InfoList::s_pMetaTable = *Window::s_pMetaTable;
        InfoList::s_pMetaTable->SetObject("__index", *InfoList::s_pMetaTable);

        InfoList::s_pMetaTable->RegisterObjectFunctor("AddInfo", &InfoList::AddInfo );

        // 22 CtrlList
        CtrlList::s_pMetaTable = new LuaPlus::LuaObject;
        *CtrlList::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_CtrlListWindow");
        *CtrlList::s_pMetaTable = *Window::s_pMetaTable;
        CtrlList::s_pMetaTable->SetObject("__index", *CtrlList::s_pMetaTable);

        CtrlList::s_pMetaTable->RegisterObjectFunctor("AddColumn", &CtrlList::AddColumn );
        CtrlList::s_pMetaTable->RegisterObjectFunctor("InsertColumn", &CtrlList::InsertColumn );
        CtrlList::s_pMetaTable->RegisterObjectFunctor("AddNewItem", &CtrlList::AddNewItem );
        CtrlList::s_pMetaTable->RegisterObjectFunctor("SetItemText", &CtrlList::SetItemText );
        CtrlList::s_pMetaTable->RegisterObjectFunctor("SetItemData", &CtrlList::SetItemData );
        CtrlList::s_pMetaTable->RegisterObjectFunctor("DeleteItem", &CtrlList::DeleteItem );
        CtrlList::s_pMetaTable->RegisterObjectFunctor("RemoveAllItem", &CtrlList::RemoveAllItem );
        CtrlList::s_pMetaTable->RegisterObjectFunctor("GetItemText", &CtrlList::GetItemText );
        CtrlList::s_pMetaTable->RegisterObjectFunctor("GetItemCount", &CtrlList::GetItemCount );
        CtrlList::s_pMetaTable->RegisterObjectFunctor("GetColumnCount", &CtrlList::GetColumnCount );
        CtrlList::s_pMetaTable->RegisterObjectFunctor("GetSelectItem", &CtrlList::GetSelectItem );

        // 23 SoftKeyWindow
        SoftKeyWindow::s_pMetaTable = new LuaPlus::LuaObject;
        *SoftKeyWindow::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_SoftKeyWindow");
        *SoftKeyWindow::s_pMetaTable = *Window::s_pMetaTable;
        SoftKeyWindow::s_pMetaTable->SetObject("__index", *SoftKeyWindow::s_pMetaTable);

        SoftKeyWindow::s_pMetaTable->RegisterObjectFunctor("SetAimEditBox", &SoftKeyWindow::SetAimEditBox );

        // 24 Animate
        AnimateWindow::s_pMetaTable = new LuaPlus::LuaObject;
        *AnimateWindow::s_pMetaTable = pLuaState->GetGlobals().CreateTable("MetaTable_Control_SoftKeyWindow");
        *AnimateWindow::s_pMetaTable = *Window::s_pMetaTable;
        AnimateWindow::s_pMetaTable->SetObject("__index", *AnimateWindow::s_pMetaTable);

        AnimateWindow::s_pMetaTable->RegisterObjectFunctor("Play", &AnimateWindow::Play);
您需要登录后才可以回帖 登录 | register

本版积分规则

雪舞知识库 | 浙ICP备15015590号-1 | 萌ICP备20232229号|浙公网安备33048102000118号 |天天打卡

GMT+8, 2025-1-18 18:49 , Processed in 0.098503 second(s), 8 queries , Redis On.

Powered by XueWu Licensed

Copyright © Tencent Cloud.

快速回复 返回顶部 返回列表