1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503
|
/*!
@file
@author Generate utility by Albert Semenov
@date 01/2009
@module
*/
#pragma once
#include "MyGUI_Managed_Widget.h"
namespace MyGUI
{
namespace Managed
{
public ref class TabControl : public Widget
{
private:
typedef MyGUI::TabControl ThisType;
public:
TabControl() : Widget() { }
internal:
TabControl( MyGUI::TabControl* _native ) : Widget(_native) { }
TabControl( BaseWidget^ _parent, MyGUI::WidgetStyle _style, const std::string& _skin, const MyGUI::IntCoord& _coord, MyGUI::Align _align, const std::string& _layer, const std::string& _name )
{
CreateWidget(_parent, _style, _skin, _coord, _align, _layer, _name);
}
virtual const std::string& getClassTypeName() override { return ThisType::getClassTypeName(); }
static BaseWidget^ WidgetCreator(BaseWidget^ _parent, MyGUI::WidgetStyle _style, const std::string& _skin, const MyGUI::IntCoord& _coord, MyGUI::Align _align, const std::string& _layer, const std::string& _name)
{
return gcnew TabControl(_parent, _style, _skin, _coord, _align, _layer, _name);
}
//InsertPoint
public:
delegate void HandleTabChangeSelect(
Convert<MyGUI::TabControl *>::Type _sender ,
Convert<size_t>::Type _index );
event HandleTabChangeSelect^ EventTabChangeSelect
{
void add(HandleTabChangeSelect^ _value)
{
bool empty = mDelegateTabChangeSelect == nullptr;
mDelegateTabChangeSelect += _value;
MMYGUI_CHECK_NATIVE(mNative);
if (empty)
static_cast<ThisType*>(mNative)->eventTabChangeSelect +=
static_cast< MyGUI::delegates::IDelegate2<
MyGUI::TabControl * ,
size_t > *>(
new Delegate2< HandleTabChangeSelect^ ,
MyGUI::TabControl * ,
size_t >(mDelegateTabChangeSelect) );
}
void remove(HandleTabChangeSelect^ _value)
{
mDelegateTabChangeSelect -= _value;
MMYGUI_CHECK_NATIVE(mNative);
bool empty = mDelegateTabChangeSelect == nullptr;
if (empty)
static_cast<ThisType*>(mNative)->eventTabChangeSelect -=
static_cast< MyGUI::delegates::IDelegate2<
MyGUI::TabControl * ,
size_t > *>(
new Delegate2< HandleTabChangeSelect^ ,
MyGUI::TabControl * ,
size_t >(mDelegateTabChangeSelect) );
}
}
private:
HandleTabChangeSelect^ mDelegateTabChangeSelect;
public:
Convert<int>::Type GetButtonWidth(
Convert<MyGUI::TabItem *>::Type _item )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<int>::To(
static_cast<ThisType*>(mNative)->getButtonWidth(
Convert<MyGUI::TabItem *>::From(_item) ) );
}
public:
Convert<int>::Type GetButtonWidthAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<int>::To(
static_cast<ThisType*>(mNative)->getButtonWidthAt(
Convert<size_t>::From(_index) ) );
}
public:
void SetButtonWidth(
Convert<MyGUI::TabItem *>::Type _item ,
Convert<int>::Type _width )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setButtonWidth(
Convert<MyGUI::TabItem *>::From(_item) ,
Convert<int>::From(_width) );
}
public:
void SetButtonWidthAt(
Convert<size_t>::Type _index ,
Convert<int>::Type _width )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setButtonWidthAt(
Convert<size_t>::From(_index) ,
Convert<int>::From(_width) );
}
public:
void BeginToItemSelected( )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->beginToItemSelected( );
}
public:
void BeginToItemLast( )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->beginToItemLast( );
}
public:
void BeginToItemFirst( )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->beginToItemFirst( );
}
public:
void BeginToItem(
Convert<MyGUI::TabItem *>::Type _item )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->beginToItem(
Convert<MyGUI::TabItem *>::From(_item) );
}
public:
void BeginToItemAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->beginToItemAt(
Convert<size_t>::From(_index) );
}
public:
Convert<const MyGUI::UString &>::Type GetItemName(
Convert<MyGUI::TabItem *>::Type _item )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<const MyGUI::UString &>::To(
static_cast<ThisType*>(mNative)->getItemName(
Convert<MyGUI::TabItem *>::From(_item) ) );
}
public:
Convert<const MyGUI::UString &>::Type GetItemNameAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<const MyGUI::UString &>::To(
static_cast<ThisType*>(mNative)->getItemNameAt(
Convert<size_t>::From(_index) ) );
}
public:
void SetItemName(
Convert<MyGUI::TabItem *>::Type _item ,
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setItemName(
Convert<MyGUI::TabItem *>::From(_item) ,
Convert<const MyGUI::UString &>::From(_name) );
}
public:
void SetItemNameAt(
Convert<size_t>::Type _index ,
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setItemNameAt(
Convert<size_t>::From(_index) ,
Convert<const MyGUI::UString &>::From(_name) );
}
public:
Convert<MyGUI::Any>::Type GetItemData(
Convert<MyGUI::TabItem *>::Type _item )
{
MMYGUI_CHECK_NATIVE(mNative);
ObjectHolder* data = static_cast<ThisType*>(mNative)->getItemData< ObjectHolder >(
Convert<MyGUI::TabItem *>::From(_item) , false );
return data ? data->toObject() : nullptr;
}
public:
Convert<MyGUI::Any>::Type GetItemDataAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
ObjectHolder* data = static_cast<ThisType*>(mNative)->getItemDataAt< ObjectHolder >(
Convert<size_t>::From(_index) , false );
return data ? data->toObject() : nullptr;
}
public:
void ClearItemData(
Convert<MyGUI::TabItem *>::Type _item )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->clearItemData(
Convert<MyGUI::TabItem *>::From(_item) );
}
public:
void ClearItemDataAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->clearItemDataAt(
Convert<size_t>::From(_index) );
}
public:
void SetItemData(
Convert<MyGUI::TabItem *>::Type _item ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setItemData(
Convert<MyGUI::TabItem *>::From(_item) ,
Convert<MyGUI::Any>::From(_data) );
}
public:
void SetItemDataAt(
Convert<size_t>::Type _index ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setItemDataAt(
Convert<size_t>::From(_index) ,
Convert<MyGUI::Any>::From(_data) );
}
public:
void SwapItems(
Convert<size_t>::Type _index1 ,
Convert<size_t>::Type _index2 )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->swapItems(
Convert<size_t>::From(_index1) ,
Convert<size_t>::From(_index2) );
}
public:
Convert<MyGUI::TabItem *>::Type FindItemWith(
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<MyGUI::TabItem *>::To(
static_cast<ThisType*>(mNative)->findItemWith(
Convert<const MyGUI::UString &>::From(_name) ) );
}
public:
Convert<size_t>::Type FindItemIndexWith(
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To(
static_cast<ThisType*>(mNative)->findItemIndexWith(
Convert<const MyGUI::UString &>::From(_name) ) );
}
public:
Convert<size_t>::Type FindItemIndex(
Convert<MyGUI::TabItem *>::Type _item )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To(
static_cast<ThisType*>(mNative)->findItemIndex(
Convert<MyGUI::TabItem *>::From(_item) ) );
}
public:
Convert<size_t>::Type GetItemIndex(
Convert<MyGUI::TabItem *>::Type _item )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To(
static_cast<ThisType*>(mNative)->getItemIndex(
Convert<MyGUI::TabItem *>::From(_item) ) );
}
public:
Convert<MyGUI::TabItem *>::Type GetItemAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<MyGUI::TabItem *>::To(
static_cast<ThisType*>(mNative)->getItemAt(
Convert<size_t>::From(_index) ) );
}
public:
void RemoveAllItems( )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->removeAllItems( );
}
public:
void RemoveItem(
Convert<MyGUI::TabItem *>::Type _item )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->removeItem(
Convert<MyGUI::TabItem *>::From(_item) );
}
public:
void RemoveItemAt(
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->removeItemAt(
Convert<size_t>::From(_index) );
}
public:
Convert<MyGUI::TabItem *>::Type AddItem(
Convert<const MyGUI::UString &>::Type _name ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<MyGUI::TabItem *>::To(
static_cast<ThisType*>(mNative)->addItem(
Convert<const MyGUI::UString &>::From(_name) ,
Convert<MyGUI::Any>::From(_data) ) );
}
Convert<MyGUI::TabItem *>::Type AddItem(
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<MyGUI::TabItem *>::To(
static_cast<ThisType*>(mNative)->addItem(
Convert<const MyGUI::UString &>::From(_name) ) );
}
public:
Convert<MyGUI::TabItem *>::Type InsertItem(
Convert<MyGUI::TabItem *>::Type _to ,
Convert<const MyGUI::UString &>::Type _name ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<MyGUI::TabItem *>::To(
static_cast<ThisType*>(mNative)->insertItem(
Convert<MyGUI::TabItem *>::From(_to) ,
Convert<const MyGUI::UString &>::From(_name) ,
Convert<MyGUI::Any>::From(_data) ) );
}
public:
Convert<MyGUI::TabItem *>::Type InsertItemAt(
Convert<size_t>::Type _index ,
Convert<const MyGUI::UString &>::Type _name ,
Convert<MyGUI::Any>::Type _data )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<MyGUI::TabItem *>::To(
static_cast<ThisType*>(mNative)->insertItemAt(
Convert<size_t>::From(_index) ,
Convert<const MyGUI::UString &>::From(_name) ,
Convert<MyGUI::Any>::From(_data) ) );
}
Convert<MyGUI::TabItem *>::Type InsertItemAt(
Convert<size_t>::Type _index ,
Convert<const MyGUI::UString &>::Type _name )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<MyGUI::TabItem *>::To(
static_cast<ThisType*>(mNative)->insertItemAt(
Convert<size_t>::From(_index) ,
Convert<const MyGUI::UString &>::From(_name) ) );
}
public:
void SetCoord(
Convert<int>::Type _left ,
Convert<int>::Type _top ,
Convert<int>::Type _width ,
Convert<int>::Type _height )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setCoord(
Convert<int>::From(_left) ,
Convert<int>::From(_top) ,
Convert<int>::From(_width) ,
Convert<int>::From(_height) );
}
public:
void SetSize(
Convert<int>::Type _width ,
Convert<int>::Type _height )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setSize(
Convert<int>::From(_width) ,
Convert<int>::From(_height) );
}
public:
void SetPosition(
Convert<int>::Type _left ,
Convert<int>::Type _top )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setPosition(
Convert<int>::From(_left) ,
Convert<int>::From(_top) );
}
public:
property Convert<bool>::Type SmoothShow
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->getSmoothShow() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setSmoothShow( Convert<bool>::From(_value) );
}
}
public:
property Convert<bool>::Type ButtonAutoWidth
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->getButtonAutoWidth() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setButtonAutoWidth( Convert<bool>::From(_value) );
}
}
public:
property Convert<int>::Type ButtonDefaultWidth
{
Convert<int>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<int>::To( static_cast<ThisType*>(mNative)->getButtonDefaultWidth() );
}
void set(Convert<int>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setButtonDefaultWidth( Convert<int>::From(_value) );
}
}
public:
property Convert<MyGUI::TabItem *>::Type ItemSelected
{
Convert<MyGUI::TabItem *>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<MyGUI::TabItem *>::To( static_cast<ThisType*>(mNative)->getItemSelected() );
}
void set(Convert<MyGUI::TabItem *>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setItemSelected( Convert<MyGUI::TabItem *>::From(_value) );
}
}
public:
property Convert<size_t>::Type IndexSelected
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getIndexSelected() );
}
void set(Convert<size_t>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setIndexSelected( Convert<size_t>::From(_value) );
}
}
public:
property Convert<size_t>::Type ItemCount
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getItemCount() );
}
}
};
} // namespace Managed
} // namespace MyGUI
|