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 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554
|
/*!
@file
@author Generate utility by Albert Semenov
@date 01/2009
@module
*/
#pragma once
#include "MyGUI_Managed_TextBox.h"
namespace MyGUI
{
namespace Managed
{
public ref class EditBox : public TextBox
{
private:
typedef MyGUI::EditBox ThisType;
public:
EditBox() : TextBox() { }
internal:
EditBox( MyGUI::EditBox* _native ) : TextBox(_native) { }
EditBox( 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 EditBox(_parent, _style, _skin, _coord, _align, _layer, _name);
}
//InsertPoint
public:
delegate void HandleEditTextChange(
Convert<MyGUI::EditBox *>::Type _sender );
event HandleEditTextChange^ EventEditTextChange
{
void add(HandleEditTextChange^ _value)
{
bool empty = mDelegateEditTextChange == nullptr;
mDelegateEditTextChange += _value;
MMYGUI_CHECK_NATIVE(mNative);
if (empty)
static_cast<ThisType*>(mNative)->eventEditTextChange +=
static_cast< MyGUI::delegates::IDelegate1<
MyGUI::EditBox * > *>(
new Delegate1< HandleEditTextChange^ ,
MyGUI::EditBox * >(mDelegateEditTextChange) );
}
void remove(HandleEditTextChange^ _value)
{
mDelegateEditTextChange -= _value;
MMYGUI_CHECK_NATIVE(mNative);
bool empty = mDelegateEditTextChange == nullptr;
if (empty)
static_cast<ThisType*>(mNative)->eventEditTextChange -=
static_cast< MyGUI::delegates::IDelegate1<
MyGUI::EditBox * > *>(
new Delegate1< HandleEditTextChange^ ,
MyGUI::EditBox * >(mDelegateEditTextChange) );
}
}
private:
HandleEditTextChange^ mDelegateEditTextChange;
public:
delegate void HandleEditSelectAccept(
Convert<MyGUI::EditBox *>::Type _sender );
event HandleEditSelectAccept^ EventEditSelectAccept
{
void add(HandleEditSelectAccept^ _value)
{
bool empty = mDelegateEditSelectAccept == nullptr;
mDelegateEditSelectAccept += _value;
MMYGUI_CHECK_NATIVE(mNative);
if (empty)
static_cast<ThisType*>(mNative)->eventEditSelectAccept +=
static_cast< MyGUI::delegates::IDelegate1<
MyGUI::EditBox * > *>(
new Delegate1< HandleEditSelectAccept^ ,
MyGUI::EditBox * >(mDelegateEditSelectAccept) );
}
void remove(HandleEditSelectAccept^ _value)
{
mDelegateEditSelectAccept -= _value;
MMYGUI_CHECK_NATIVE(mNative);
bool empty = mDelegateEditSelectAccept == nullptr;
if (empty)
static_cast<ThisType*>(mNative)->eventEditSelectAccept -=
static_cast< MyGUI::delegates::IDelegate1<
MyGUI::EditBox * > *>(
new Delegate1< HandleEditSelectAccept^ ,
MyGUI::EditBox * >(mDelegateEditSelectAccept) );
}
}
private:
HandleEditSelectAccept^ mDelegateEditSelectAccept;
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:
void SetPasswordChar(
Convert<const MyGUI::UString &>::Type _char )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setPasswordChar(
Convert<const MyGUI::UString &>::From(_char) );
}
public:
void EraseText(
Convert<size_t>::Type _start ,
Convert<size_t>::Type _count )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->eraseText(
Convert<size_t>::From(_start) ,
Convert<size_t>::From(_count) );
}
public:
void AddText(
Convert<const MyGUI::UString &>::Type _text )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->addText(
Convert<const MyGUI::UString &>::From(_text) );
}
public:
void InsertText(
Convert<const MyGUI::UString &>::Type _text ,
Convert<size_t>::Type _index )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->insertText(
Convert<const MyGUI::UString &>::From(_text) ,
Convert<size_t>::From(_index) );
}
public:
void SetTextSelectionColour(
Convert<const MyGUI::Colour &>::Type _value )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setTextSelectionColour(
Convert<const MyGUI::Colour &>::From(_value) );
}
public:
void DeleteTextSelection( )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->deleteTextSelection( );
}
public:
void SetTextSelection(
Convert<size_t>::Type _start ,
Convert<size_t>::Type _end )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setTextSelection(
Convert<size_t>::From(_start) ,
Convert<size_t>::From(_end) );
}
public:
Convert<MyGUI::UString>::Type GetTextInterval(
Convert<size_t>::Type _start ,
Convert<size_t>::Type _count )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<MyGUI::UString>::To(
static_cast<ThisType*>(mNative)->getTextInterval(
Convert<size_t>::From(_start) ,
Convert<size_t>::From(_count) ) );
}
public:
void SetTextIntervalColour(
Convert<size_t>::Type _start ,
Convert<size_t>::Type _count ,
Convert<const MyGUI::Colour &>::Type _colour )
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setTextIntervalColour(
Convert<size_t>::From(_start) ,
Convert<size_t>::From(_count) ,
Convert<const MyGUI::Colour &>::From(_colour) );
}
public:
property Convert<size_t>::Type HScrollPosition
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getHScrollPosition() );
}
void set(Convert<size_t>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setHScrollPosition( Convert<size_t>::From(_value) );
}
}
public:
property Convert<size_t>::Type HScrollRange
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getHScrollRange() );
}
}
public:
property Convert<bool>::Type IsVisibleHScroll
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->isVisibleHScroll() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setVisibleHScroll( Convert<bool>::From(_value) );
}
}
public:
property Convert<size_t>::Type VScrollPosition
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getVScrollPosition() );
}
void set(Convert<size_t>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setVScrollPosition( Convert<size_t>::From(_value) );
}
}
public:
property Convert<size_t>::Type VScrollRange
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getVScrollRange() );
}
}
public:
property Convert<bool>::Type IsVisibleVScroll
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->isVisibleVScroll() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setVisibleVScroll( Convert<bool>::From(_value) );
}
}
public:
property Convert<bool>::Type InvertSelected
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->getInvertSelected() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setInvertSelected( Convert<bool>::From(_value) );
}
}
public:
property Convert<bool>::Type TabPrinting
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->getTabPrinting() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setTabPrinting( Convert<bool>::From(_value) );
}
}
public:
property Convert<bool>::Type EditWordWrap
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->getEditWordWrap() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setEditWordWrap( Convert<bool>::From(_value) );
}
}
public:
property Convert<unsigned int>::Type PasswordChar
{
Convert<unsigned int>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<unsigned int>::To( static_cast<ThisType*>(mNative)->getPasswordChar() );
}
void set(Convert<unsigned int>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setPasswordChar( Convert<unsigned int>::From(_value) );
}
}
public:
property Convert<bool>::Type EditStatic
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->getEditStatic() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setEditStatic( Convert<bool>::From(_value) );
}
}
public:
property Convert<bool>::Type EditMultiLine
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->getEditMultiLine() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setEditMultiLine( Convert<bool>::From(_value) );
}
}
public:
property Convert<bool>::Type EditPassword
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->getEditPassword() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setEditPassword( Convert<bool>::From(_value) );
}
}
public:
property Convert<bool>::Type EditReadOnly
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->getEditReadOnly() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setEditReadOnly( Convert<bool>::From(_value) );
}
}
public:
property Convert<size_t>::Type MaxTextLength
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getMaxTextLength() );
}
void set(Convert<size_t>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setMaxTextLength( Convert<size_t>::From(_value) );
}
}
public:
property Convert<bool>::Type OverflowToTheLeft
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->getOverflowToTheLeft() );
}
void set(Convert<bool>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setOverflowToTheLeft( Convert<bool>::From(_value) );
}
}
public:
property Convert<size_t>::Type TextLength
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getTextLength() );
}
}
public:
property Convert<MyGUI::UString>::Type OnlyText
{
Convert<MyGUI::UString>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<MyGUI::UString>::To( static_cast<ThisType*>(mNative)->getOnlyText() );
}
void set(Convert<const MyGUI::UString &>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setOnlyText( Convert<const MyGUI::UString &>::From(_value) );
}
}
public:
property Convert<size_t>::Type TextCursor
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getTextCursor() );
}
void set(Convert<size_t>::Type _value)
{
MMYGUI_CHECK_NATIVE(mNative);
static_cast<ThisType*>(mNative)->setTextCursor( Convert<size_t>::From(_value) );
}
}
public:
property Convert<bool>::Type IsTextSelection
{
Convert<bool>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<bool>::To( static_cast<ThisType*>(mNative)->isTextSelection() );
}
}
public:
property Convert<MyGUI::UString>::Type TextSelection
{
Convert<MyGUI::UString>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<MyGUI::UString>::To( static_cast<ThisType*>(mNative)->getTextSelection() );
}
}
public:
property Convert<size_t>::Type TextSelectionLength
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getTextSelectionLength() );
}
}
public:
property Convert<size_t>::Type TextSelectionEnd
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getTextSelectionEnd() );
}
}
public:
property Convert<size_t>::Type TextSelectionStart
{
Convert<size_t>::Type get( )
{
MMYGUI_CHECK_NATIVE(mNative);
return Convert<size_t>::To( static_cast<ThisType*>(mNative)->getTextSelectionStart() );
}
}
};
} // namespace Managed
} // namespace MyGUI
|