1 /** 2 3 4 Copyright: 5 Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. 6 Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) 7 Copyright (c) 2017-2018 Godot-D contributors 8 9 License: $(LINK2 https://opensource.org/licenses/MIT, MIT License) 10 11 12 */ 13 module godot.filesystemdock; 14 import std.meta : AliasSeq, staticIndexOf; 15 import std.traits : Unqual; 16 import godot.d.traits; 17 import godot.core; 18 import godot.c; 19 import godot.d.bind; 20 import godot.d.reference; 21 import godot.globalenums; 22 import godot.object; 23 import godot.vboxcontainer; 24 import godot.inputevent; 25 import godot.texture; 26 import godot.control; 27 /** 28 29 */ 30 @GodotBaseClass struct FileSystemDock 31 { 32 package(godot) enum string _GODOT_internal_name = "FileSystemDock"; 33 public: 34 @nogc nothrow: 35 union { /** */ godot_object _godot_object; /** */ VBoxContainer _GODOT_base; } 36 alias _GODOT_base this; 37 alias BaseClasses = AliasSeq!(typeof(_GODOT_base), typeof(_GODOT_base).BaseClasses); 38 package(godot) __gshared bool _classBindingInitialized = false; 39 package(godot) static struct GDNativeClassBinding 40 { 41 __gshared: 42 @GodotName("_bw_history") GodotMethod!(void) _bwHistory; 43 @GodotName("_duplicate_operation_confirm") GodotMethod!(void) _duplicateOperationConfirm; 44 @GodotName("_feature_profile_changed") GodotMethod!(void) _featureProfileChanged; 45 @GodotName("_file_list_activate_file") GodotMethod!(void, long) _fileListActivateFile; 46 @GodotName("_file_list_gui_input") GodotMethod!(void, InputEvent) _fileListGuiInput; 47 @GodotName("_file_list_rmb_option") GodotMethod!(void, long) _fileListRmbOption; 48 @GodotName("_file_list_rmb_pressed") GodotMethod!(void, Vector2) _fileListRmbPressed; 49 @GodotName("_file_list_rmb_select") GodotMethod!(void, long, Vector2) _fileListRmbSelect; 50 @GodotName("_file_list_thumbnail_done") GodotMethod!(void, String, Texture, Texture, Variant) _fileListThumbnailDone; 51 @GodotName("_file_multi_selected") GodotMethod!(void, long, bool) _fileMultiSelected; 52 @GodotName("_file_removed") GodotMethod!(void, String) _fileRemoved; 53 @GodotName("_folder_removed") GodotMethod!(void, String) _folderRemoved; 54 @GodotName("_fs_changed") GodotMethod!(void) _fsChanged; 55 @GodotName("_fw_history") GodotMethod!(void) _fwHistory; 56 @GodotName("_make_dir_confirm") GodotMethod!(void) _makeDirConfirm; 57 @GodotName("_make_scene_confirm") GodotMethod!(void) _makeSceneConfirm; 58 @GodotName("_move_operation_confirm") GodotMethod!(void, String, bool) _moveOperationConfirm; 59 @GodotName("_move_with_overwrite") GodotMethod!(void) _moveWithOverwrite; 60 @GodotName("_navigate_to_path") GodotMethod!(void, String, bool) _navigateToPath; 61 @GodotName("_preview_invalidated") GodotMethod!(void, String) _previewInvalidated; 62 @GodotName("_rename_operation_confirm") GodotMethod!(void) _renameOperationConfirm; 63 @GodotName("_rescan") GodotMethod!(void) _rescan; 64 @GodotName("_resource_created") GodotMethod!(void) _resourceCreated; 65 @GodotName("_search_changed") GodotMethod!(void, String, Control) _searchChanged; 66 @GodotName("_select_file") GodotMethod!(void, String, bool) _selectFile; 67 @GodotName("_toggle_file_display") GodotMethod!(void) _toggleFileDisplay; 68 @GodotName("_toggle_split_mode") GodotMethod!(void, bool) _toggleSplitMode; 69 @GodotName("_tree_activate_file") GodotMethod!(void) _treeActivateFile; 70 @GodotName("_tree_empty_selected") GodotMethod!(void) _treeEmptySelected; 71 @GodotName("_tree_gui_input") GodotMethod!(void, InputEvent) _treeGuiInput; 72 @GodotName("_tree_multi_selected") GodotMethod!(void, GodotObject, long, bool) _treeMultiSelected; 73 @GodotName("_tree_rmb_empty") GodotMethod!(void, Vector2) _treeRmbEmpty; 74 @GodotName("_tree_rmb_option") GodotMethod!(void, long) _treeRmbOption; 75 @GodotName("_tree_rmb_select") GodotMethod!(void, Vector2) _treeRmbSelect; 76 @GodotName("_tree_thumbnail_done") GodotMethod!(void, String, Texture, Texture, Variant) _treeThumbnailDone; 77 @GodotName("_update_import_dock") GodotMethod!(void) _updateImportDock; 78 @GodotName("_update_tree") GodotMethod!(void, PoolStringArray, bool, bool, bool) _updateTree; 79 @GodotName("can_drop_data_fw") GodotMethod!(bool, Vector2, Variant, Control) canDropDataFw; 80 @GodotName("drop_data_fw") GodotMethod!(void, Vector2, Variant, Control) dropDataFw; 81 @GodotName("get_drag_data_fw") GodotMethod!(Variant, Vector2, Control) getDragDataFw; 82 @GodotName("navigate_to_path") GodotMethod!(void, String) navigateToPath; 83 } 84 /// 85 pragma(inline, true) bool opEquals(in FileSystemDock other) const 86 { return _godot_object.ptr is other._godot_object.ptr; } 87 /// 88 pragma(inline, true) typeof(null) opAssign(typeof(null) n) 89 { _godot_object.ptr = n; return null; } 90 /// 91 pragma(inline, true) bool opEquals(typeof(null) n) const 92 { return _godot_object.ptr is n; } 93 /// 94 size_t toHash() const @trusted { return cast(size_t)_godot_object.ptr; } 95 mixin baseCasts; 96 /// Construct a new instance of FileSystemDock. 97 /// Note: use `memnew!FileSystemDock` instead. 98 static FileSystemDock _new() 99 { 100 static godot_class_constructor constructor; 101 if(constructor is null) constructor = _godot_api.godot_get_class_constructor("FileSystemDock"); 102 if(constructor is null) return typeof(this).init; 103 return cast(FileSystemDock)(constructor()); 104 } 105 @disable new(size_t s); 106 /** 107 108 */ 109 void _bwHistory() 110 { 111 Array _GODOT_args = Array.make(); 112 String _GODOT_method_name = String("_bw_history"); 113 this.callv(_GODOT_method_name, _GODOT_args); 114 } 115 /** 116 117 */ 118 void _duplicateOperationConfirm() 119 { 120 Array _GODOT_args = Array.make(); 121 String _GODOT_method_name = String("_duplicate_operation_confirm"); 122 this.callv(_GODOT_method_name, _GODOT_args); 123 } 124 /** 125 126 */ 127 void _featureProfileChanged() 128 { 129 Array _GODOT_args = Array.make(); 130 String _GODOT_method_name = String("_feature_profile_changed"); 131 this.callv(_GODOT_method_name, _GODOT_args); 132 } 133 /** 134 135 */ 136 void _fileListActivateFile(in long arg0) 137 { 138 Array _GODOT_args = Array.make(); 139 _GODOT_args.append(arg0); 140 String _GODOT_method_name = String("_file_list_activate_file"); 141 this.callv(_GODOT_method_name, _GODOT_args); 142 } 143 /** 144 145 */ 146 void _fileListGuiInput(InputEvent arg0) 147 { 148 Array _GODOT_args = Array.make(); 149 _GODOT_args.append(arg0); 150 String _GODOT_method_name = String("_file_list_gui_input"); 151 this.callv(_GODOT_method_name, _GODOT_args); 152 } 153 /** 154 155 */ 156 void _fileListRmbOption(in long option) 157 { 158 Array _GODOT_args = Array.make(); 159 _GODOT_args.append(option); 160 String _GODOT_method_name = String("_file_list_rmb_option"); 161 this.callv(_GODOT_method_name, _GODOT_args); 162 } 163 /** 164 165 */ 166 void _fileListRmbPressed(in Vector2 arg0) 167 { 168 Array _GODOT_args = Array.make(); 169 _GODOT_args.append(arg0); 170 String _GODOT_method_name = String("_file_list_rmb_pressed"); 171 this.callv(_GODOT_method_name, _GODOT_args); 172 } 173 /** 174 175 */ 176 void _fileListRmbSelect(in long arg0, in Vector2 arg1) 177 { 178 Array _GODOT_args = Array.make(); 179 _GODOT_args.append(arg0); 180 _GODOT_args.append(arg1); 181 String _GODOT_method_name = String("_file_list_rmb_select"); 182 this.callv(_GODOT_method_name, _GODOT_args); 183 } 184 /** 185 186 */ 187 void _fileListThumbnailDone(VariantArg3)(in String arg0, Texture arg1, Texture arg2, in VariantArg3 arg3) 188 { 189 Array _GODOT_args = Array.make(); 190 _GODOT_args.append(arg0); 191 _GODOT_args.append(arg1); 192 _GODOT_args.append(arg2); 193 _GODOT_args.append(arg3); 194 String _GODOT_method_name = String("_file_list_thumbnail_done"); 195 this.callv(_GODOT_method_name, _GODOT_args); 196 } 197 /** 198 199 */ 200 void _fileMultiSelected(in long arg0, in bool arg1) 201 { 202 Array _GODOT_args = Array.make(); 203 _GODOT_args.append(arg0); 204 _GODOT_args.append(arg1); 205 String _GODOT_method_name = String("_file_multi_selected"); 206 this.callv(_GODOT_method_name, _GODOT_args); 207 } 208 /** 209 210 */ 211 void _fileRemoved(in String arg0) 212 { 213 Array _GODOT_args = Array.make(); 214 _GODOT_args.append(arg0); 215 String _GODOT_method_name = String("_file_removed"); 216 this.callv(_GODOT_method_name, _GODOT_args); 217 } 218 /** 219 220 */ 221 void _folderRemoved(in String arg0) 222 { 223 Array _GODOT_args = Array.make(); 224 _GODOT_args.append(arg0); 225 String _GODOT_method_name = String("_folder_removed"); 226 this.callv(_GODOT_method_name, _GODOT_args); 227 } 228 /** 229 230 */ 231 void _fsChanged() 232 { 233 Array _GODOT_args = Array.make(); 234 String _GODOT_method_name = String("_fs_changed"); 235 this.callv(_GODOT_method_name, _GODOT_args); 236 } 237 /** 238 239 */ 240 void _fwHistory() 241 { 242 Array _GODOT_args = Array.make(); 243 String _GODOT_method_name = String("_fw_history"); 244 this.callv(_GODOT_method_name, _GODOT_args); 245 } 246 /** 247 248 */ 249 void _makeDirConfirm() 250 { 251 Array _GODOT_args = Array.make(); 252 String _GODOT_method_name = String("_make_dir_confirm"); 253 this.callv(_GODOT_method_name, _GODOT_args); 254 } 255 /** 256 257 */ 258 void _makeSceneConfirm() 259 { 260 Array _GODOT_args = Array.make(); 261 String _GODOT_method_name = String("_make_scene_confirm"); 262 this.callv(_GODOT_method_name, _GODOT_args); 263 } 264 /** 265 266 */ 267 void _moveOperationConfirm(in String to_path, in bool overwrite = false) 268 { 269 Array _GODOT_args = Array.make(); 270 _GODOT_args.append(to_path); 271 _GODOT_args.append(overwrite); 272 String _GODOT_method_name = String("_move_operation_confirm"); 273 this.callv(_GODOT_method_name, _GODOT_args); 274 } 275 /** 276 277 */ 278 void _moveWithOverwrite() 279 { 280 Array _GODOT_args = Array.make(); 281 String _GODOT_method_name = String("_move_with_overwrite"); 282 this.callv(_GODOT_method_name, _GODOT_args); 283 } 284 /** 285 286 */ 287 void _navigateToPath(in String arg0, in bool arg1 = false) 288 { 289 Array _GODOT_args = Array.make(); 290 _GODOT_args.append(arg0); 291 _GODOT_args.append(arg1); 292 String _GODOT_method_name = String("_navigate_to_path"); 293 this.callv(_GODOT_method_name, _GODOT_args); 294 } 295 /** 296 297 */ 298 void _previewInvalidated(in String arg0) 299 { 300 Array _GODOT_args = Array.make(); 301 _GODOT_args.append(arg0); 302 String _GODOT_method_name = String("_preview_invalidated"); 303 this.callv(_GODOT_method_name, _GODOT_args); 304 } 305 /** 306 307 */ 308 void _renameOperationConfirm() 309 { 310 Array _GODOT_args = Array.make(); 311 String _GODOT_method_name = String("_rename_operation_confirm"); 312 this.callv(_GODOT_method_name, _GODOT_args); 313 } 314 /** 315 316 */ 317 void _rescan() 318 { 319 Array _GODOT_args = Array.make(); 320 String _GODOT_method_name = String("_rescan"); 321 this.callv(_GODOT_method_name, _GODOT_args); 322 } 323 /** 324 325 */ 326 void _resourceCreated() const 327 { 328 Array _GODOT_args = Array.make(); 329 String _GODOT_method_name = String("_resource_created"); 330 this.callv(_GODOT_method_name, _GODOT_args); 331 } 332 /** 333 334 */ 335 void _searchChanged(in String arg0, Control arg1) 336 { 337 Array _GODOT_args = Array.make(); 338 _GODOT_args.append(arg0); 339 _GODOT_args.append(arg1); 340 String _GODOT_method_name = String("_search_changed"); 341 this.callv(_GODOT_method_name, _GODOT_args); 342 } 343 /** 344 345 */ 346 void _selectFile(in String arg0, in bool arg1) 347 { 348 Array _GODOT_args = Array.make(); 349 _GODOT_args.append(arg0); 350 _GODOT_args.append(arg1); 351 String _GODOT_method_name = String("_select_file"); 352 this.callv(_GODOT_method_name, _GODOT_args); 353 } 354 /** 355 356 */ 357 void _toggleFileDisplay() 358 { 359 Array _GODOT_args = Array.make(); 360 String _GODOT_method_name = String("_toggle_file_display"); 361 this.callv(_GODOT_method_name, _GODOT_args); 362 } 363 /** 364 365 */ 366 void _toggleSplitMode(in bool arg0) 367 { 368 Array _GODOT_args = Array.make(); 369 _GODOT_args.append(arg0); 370 String _GODOT_method_name = String("_toggle_split_mode"); 371 this.callv(_GODOT_method_name, _GODOT_args); 372 } 373 /** 374 375 */ 376 void _treeActivateFile() 377 { 378 Array _GODOT_args = Array.make(); 379 String _GODOT_method_name = String("_tree_activate_file"); 380 this.callv(_GODOT_method_name, _GODOT_args); 381 } 382 /** 383 384 */ 385 void _treeEmptySelected() 386 { 387 Array _GODOT_args = Array.make(); 388 String _GODOT_method_name = String("_tree_empty_selected"); 389 this.callv(_GODOT_method_name, _GODOT_args); 390 } 391 /** 392 393 */ 394 void _treeGuiInput(InputEvent arg0) 395 { 396 Array _GODOT_args = Array.make(); 397 _GODOT_args.append(arg0); 398 String _GODOT_method_name = String("_tree_gui_input"); 399 this.callv(_GODOT_method_name, _GODOT_args); 400 } 401 /** 402 403 */ 404 void _treeMultiSelected(GodotObject arg0, in long arg1, in bool arg2) 405 { 406 Array _GODOT_args = Array.make(); 407 _GODOT_args.append(arg0); 408 _GODOT_args.append(arg1); 409 _GODOT_args.append(arg2); 410 String _GODOT_method_name = String("_tree_multi_selected"); 411 this.callv(_GODOT_method_name, _GODOT_args); 412 } 413 /** 414 415 */ 416 void _treeRmbEmpty(in Vector2 arg0) 417 { 418 Array _GODOT_args = Array.make(); 419 _GODOT_args.append(arg0); 420 String _GODOT_method_name = String("_tree_rmb_empty"); 421 this.callv(_GODOT_method_name, _GODOT_args); 422 } 423 /** 424 425 */ 426 void _treeRmbOption(in long option) 427 { 428 Array _GODOT_args = Array.make(); 429 _GODOT_args.append(option); 430 String _GODOT_method_name = String("_tree_rmb_option"); 431 this.callv(_GODOT_method_name, _GODOT_args); 432 } 433 /** 434 435 */ 436 void _treeRmbSelect(in Vector2 arg0) 437 { 438 Array _GODOT_args = Array.make(); 439 _GODOT_args.append(arg0); 440 String _GODOT_method_name = String("_tree_rmb_select"); 441 this.callv(_GODOT_method_name, _GODOT_args); 442 } 443 /** 444 445 */ 446 void _treeThumbnailDone(VariantArg3)(in String arg0, Texture arg1, Texture arg2, in VariantArg3 arg3) 447 { 448 Array _GODOT_args = Array.make(); 449 _GODOT_args.append(arg0); 450 _GODOT_args.append(arg1); 451 _GODOT_args.append(arg2); 452 _GODOT_args.append(arg3); 453 String _GODOT_method_name = String("_tree_thumbnail_done"); 454 this.callv(_GODOT_method_name, _GODOT_args); 455 } 456 /** 457 458 */ 459 void _updateImportDock() 460 { 461 Array _GODOT_args = Array.make(); 462 String _GODOT_method_name = String("_update_import_dock"); 463 this.callv(_GODOT_method_name, _GODOT_args); 464 } 465 /** 466 467 */ 468 void _updateTree(in PoolStringArray arg0, in bool arg1, in bool arg2, in bool arg3) 469 { 470 Array _GODOT_args = Array.make(); 471 _GODOT_args.append(arg0); 472 _GODOT_args.append(arg1); 473 _GODOT_args.append(arg2); 474 _GODOT_args.append(arg3); 475 String _GODOT_method_name = String("_update_tree"); 476 this.callv(_GODOT_method_name, _GODOT_args); 477 } 478 /** 479 480 */ 481 bool canDropDataFw(VariantArg1)(in Vector2 arg0, in VariantArg1 arg1, Control arg2) const 482 { 483 checkClassBinding!(typeof(this))(); 484 return ptrcall!(bool)(GDNativeClassBinding.canDropDataFw, _godot_object, arg0, arg1, arg2); 485 } 486 /** 487 488 */ 489 void dropDataFw(VariantArg1)(in Vector2 arg0, in VariantArg1 arg1, Control arg2) 490 { 491 checkClassBinding!(typeof(this))(); 492 ptrcall!(void)(GDNativeClassBinding.dropDataFw, _godot_object, arg0, arg1, arg2); 493 } 494 /** 495 496 */ 497 Variant getDragDataFw(in Vector2 arg0, Control arg1) 498 { 499 checkClassBinding!(typeof(this))(); 500 return ptrcall!(Variant)(GDNativeClassBinding.getDragDataFw, _godot_object, arg0, arg1); 501 } 502 /** 503 504 */ 505 void navigateToPath(in String arg0) 506 { 507 checkClassBinding!(typeof(this))(); 508 ptrcall!(void)(GDNativeClassBinding.navigateToPath, _godot_object, arg0); 509 } 510 }