You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-24 15:26:15 +00:00
Bring that Whole New World to the Old Continent too
Applies the clang-format style to the 2.1 branch as done for master in
5dbf1809c6.
This commit is contained in:
@@ -29,12 +29,12 @@
|
||||
#ifndef EDITORFILEDIALOG_H
|
||||
#define EDITORFILEDIALOG_H
|
||||
|
||||
#include "os/dir_access.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/dialogs.h"
|
||||
#include "scene/gui/item_list.h"
|
||||
#include "scene/gui/line_edit.h"
|
||||
#include "scene/gui/option_button.h"
|
||||
#include "os/dir_access.h"
|
||||
#include "scene/gui/box_container.h"
|
||||
#include "scene/gui/texture_frame.h"
|
||||
#include "scene/gui/tool_button.h"
|
||||
/**
|
||||
@@ -42,23 +42,20 @@
|
||||
*/
|
||||
class EditorFileDialog : public ConfirmationDialog {
|
||||
|
||||
OBJ_TYPE( EditorFileDialog, ConfirmationDialog );
|
||||
OBJ_TYPE(EditorFileDialog, ConfirmationDialog);
|
||||
|
||||
public:
|
||||
|
||||
enum DisplayMode {
|
||||
DISPLAY_THUMBNAILS,
|
||||
DISPLAY_LIST
|
||||
};
|
||||
|
||||
|
||||
enum Access {
|
||||
ACCESS_RESOURCES,
|
||||
ACCESS_USERDATA,
|
||||
ACCESS_FILESYSTEM
|
||||
};
|
||||
|
||||
|
||||
enum Mode {
|
||||
MODE_OPEN_FILE,
|
||||
MODE_OPEN_FILES,
|
||||
@@ -67,8 +64,8 @@ public:
|
||||
MODE_SAVE_FILE
|
||||
};
|
||||
|
||||
typedef Ref<Texture> (*GetIconFunc)(const String&);
|
||||
typedef void (*RegisterFunc)(EditorFileDialog*);
|
||||
typedef Ref<Texture> (*GetIconFunc)(const String &);
|
||||
typedef void (*RegisterFunc)(EditorFileDialog *);
|
||||
|
||||
static GetIconFunc get_icon_func;
|
||||
static GetIconFunc get_large_icon_func;
|
||||
@@ -76,7 +73,6 @@ public:
|
||||
static RegisterFunc unregister_func;
|
||||
|
||||
private:
|
||||
|
||||
ConfirmationDialog *makedialog;
|
||||
LineEdit *makedirname;
|
||||
|
||||
@@ -105,7 +101,6 @@ private:
|
||||
ToolButton *mode_thumbnails;
|
||||
ToolButton *mode_list;
|
||||
|
||||
|
||||
ToolButton *refresh;
|
||||
ToolButton *favorite;
|
||||
|
||||
@@ -143,8 +138,6 @@ private:
|
||||
void _favorite_move_up();
|
||||
void _favorite_move_down();
|
||||
|
||||
|
||||
|
||||
void _recent_selected(int p_idx);
|
||||
|
||||
void _item_selected(int p_item);
|
||||
@@ -152,7 +145,7 @@ private:
|
||||
|
||||
void _select_drive(int p_idx);
|
||||
void _dir_entered(String p_dir);
|
||||
void _file_entered(const String& p_file);
|
||||
void _file_entered(const String &p_file);
|
||||
void _action_pressed();
|
||||
void _save_confirm_pressed();
|
||||
void _cancel_pressed();
|
||||
@@ -171,21 +164,19 @@ private:
|
||||
void _save_to_recent();
|
||||
//callback funtion is callback(String p_path,Ref<Texture> preview,Variant udata) preview null if could not load
|
||||
|
||||
void _thumbnail_result(const String& p_path,const Ref<Texture>& p_preview, const Variant& p_udata);
|
||||
void _thumbnail_done(const String& p_path,const Ref<Texture>& p_preview, const Variant& p_udata);
|
||||
void _request_single_thumbnail(const String& p_path);
|
||||
void _thumbnail_result(const String &p_path, const Ref<Texture> &p_preview, const Variant &p_udata);
|
||||
void _thumbnail_done(const String &p_path, const Ref<Texture> &p_preview, const Variant &p_udata);
|
||||
void _request_single_thumbnail(const String &p_path);
|
||||
|
||||
void _unhandled_input(const InputEvent& p_event);
|
||||
void _unhandled_input(const InputEvent &p_event);
|
||||
|
||||
protected:
|
||||
|
||||
void _notification(int p_what);
|
||||
static void _bind_methods();
|
||||
//bind helpers
|
||||
public:
|
||||
|
||||
void clear_filters();
|
||||
void add_filter(const String& p_filter);
|
||||
void add_filter(const String &p_filter);
|
||||
|
||||
void set_enable_multiple_selection(bool p_enable);
|
||||
Vector<String> get_selected_files() const;
|
||||
@@ -193,9 +184,9 @@ public:
|
||||
String get_current_dir() const;
|
||||
String get_current_file() const;
|
||||
String get_current_path() const;
|
||||
void set_current_dir(const String& p_dir);
|
||||
void set_current_file(const String& p_file);
|
||||
void set_current_path(const String& p_path);
|
||||
void set_current_dir(const String &p_dir);
|
||||
void set_current_file(const String &p_file);
|
||||
void set_current_path(const String &p_path);
|
||||
|
||||
void set_display_mode(DisplayMode p_mode);
|
||||
DisplayMode get_display_mode() const;
|
||||
@@ -222,22 +213,22 @@ public:
|
||||
|
||||
EditorFileDialog();
|
||||
~EditorFileDialog();
|
||||
|
||||
};
|
||||
|
||||
class EditorLineEditFileChooser : public HBoxContainer {
|
||||
|
||||
OBJ_TYPE( EditorLineEditFileChooser, HBoxContainer );
|
||||
OBJ_TYPE(EditorLineEditFileChooser, HBoxContainer);
|
||||
Button *button;
|
||||
LineEdit *line_edit;
|
||||
EditorFileDialog *dialog;
|
||||
|
||||
void _chosen(const String& p_text);
|
||||
void _chosen(const String &p_text);
|
||||
void _browse();
|
||||
|
||||
protected:
|
||||
static void _bind_methods();
|
||||
public:
|
||||
|
||||
public:
|
||||
Button *get_button() { return button; }
|
||||
LineEdit *get_line_edit() { return line_edit; }
|
||||
EditorFileDialog *get_file_dialog() { return dialog; }
|
||||
@@ -245,8 +236,8 @@ public:
|
||||
EditorLineEditFileChooser();
|
||||
};
|
||||
|
||||
VARIANT_ENUM_CAST( EditorFileDialog::Mode );
|
||||
VARIANT_ENUM_CAST( EditorFileDialog::Access );
|
||||
VARIANT_ENUM_CAST( EditorFileDialog::DisplayMode );
|
||||
VARIANT_ENUM_CAST(EditorFileDialog::Mode);
|
||||
VARIANT_ENUM_CAST(EditorFileDialog::Access);
|
||||
VARIANT_ENUM_CAST(EditorFileDialog::DisplayMode);
|
||||
|
||||
#endif // EDITORFILEDIALOG_H
|
||||
|
||||
Reference in New Issue
Block a user