2015-05-31 01:59:42 -03:00
/**************************************************************************/
2016-06-18 14:46:12 +02:00
/* editor_file_dialog.h */
2015-05-31 01:59:42 -03:00
/**************************************************************************/
/* This file is part of: */
/* GODOT ENGINE */
/* https://godotengine.org */
/**************************************************************************/
/* Copyright (c) 2014-present Godot Engine contributors (see AUTHORS.md). */
/* Copyright (c) 2007-2014 Juan Linietsky, Ariel Manzur. */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
/* "Software"), to deal in the Software without restriction, including */
/* without limitation the rights to use, copy, modify, merge, publish, */
/* distribute, sublicense, and/or sell copies of the Software, and to */
/* permit persons to whom the Software is furnished to do so, subject to */
/* the following conditions: */
/* */
/* The above copyright notice and this permission notice shall be */
/* included in all copies or substantial portions of the Software. */
/* */
/* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, */
/* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF */
/* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. */
/* IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY */
/* CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, */
/* TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE */
/* SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */
/**************************************************************************/
2018-01-05 00:50:27 +01:00
2022-05-02 16:28:25 +02:00
# pragma once
2015-05-31 01:59:42 -03:00
2025-12-02 12:30:51 +01:00
# include "scene/gui/file_dialog.h"
2017-12-02 01:37:32 +01:00
class DependencyRemoveDialog ;
2025-12-02 12:30:51 +01:00
class EditorFileDialog : public FileDialog {
GDCLASS ( EditorFileDialog , FileDialog ) ;
2015-05-31 01:59:42 -03:00
2025-12-02 12:30:51 +01:00
DependencyRemoveDialog * dependency_remove_dialog = nullptr ;
2024-03-21 10:42:38 +02:00
2015-05-31 01:59:42 -03:00
protected :
2025-12-02 12:30:51 +01:00
virtual void _item_menu_id_pressed ( int p_option ) override ;
2025-12-04 10:36:39 +08:00
virtual void _dir_contents_changed ( ) override ;
2025-12-02 12:30:51 +01:00
virtual bool _should_use_native_popup ( ) const override ;
virtual bool _should_hide_file ( const String & p_file ) const override ;
virtual Color _get_folder_color ( const String & p_path ) const override ;
2022-09-01 18:52:49 +03:00
2015-05-31 01:59:42 -03:00
static void _bind_methods ( ) ;
2025-12-02 12:30:51 +01:00
void _validate_property ( PropertyInfo & p_property ) const ;
void _notification ( int p_what ) ;
2022-02-03 01:21:52 +01:00
2015-05-31 01:59:42 -03:00
public :
2025-10-02 14:02:16 +02:00
# ifndef DISABLE_DEPRECATED
void add_side_menu ( Control * p_menu , const String & p_title = " " ) { ERR_FAIL_MSG ( " add_side_menu() is kept for compatibility and does nothing. For similar functionality, you can show another dialog after file dialog. " ) ; }
2025-12-02 12:30:51 +01:00
void set_disable_overwrite_warning ( bool p_disable ) { set_customization_flag_enabled ( CUSTOMIZATION_OVERWRITE_WARNING , ! p_disable ) ; }
bool is_overwrite_warning_disabled ( ) const { return ! is_customization_flag_enabled ( CUSTOMIZATION_OVERWRITE_WARNING ) ; }
2025-10-02 14:02:16 +02:00
# endif
2015-05-31 01:59:42 -03:00
} ;