summaryrefslogtreecommitdiffstats
path: root/editor/editor_audio_buses.h
diff options
context:
space:
mode:
authorRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
committerRémi Verschelde <rverschelde@gmail.com>2017-03-05 16:44:50 +0100
commit5dbf1809c6e3e905b94b8764e99491e608122261 (patch)
tree5e5a5360db15d86d59ec8c6e4f7eb511388c5a9a /editor/editor_audio_buses.h
parent45438e9918d421b244bfd7776a30e67dc7f2d3e3 (diff)
downloadredot-engine-5dbf1809c6e3e905b94b8764e99491e608122261.tar.gz
A Whole New World (clang-format edition)
I can show you the code Pretty, with proper whitespace Tell me, coder, now when did You last write readable code? I can open your eyes Make you see your bad indent Force you to respect the style The core devs agreed upon A whole new world A new fantastic code format A de facto standard With some sugar Enforced with clang-format A whole new world A dazzling style we all dreamed of And when we read it through It's crystal clear That now we're in a whole new world of code
Diffstat (limited to 'editor/editor_audio_buses.h')
-rw-r--r--editor/editor_audio_buses.h80
1 files changed, 35 insertions, 45 deletions
diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h
index 8f9e327368..06a9c01bf0 100644
--- a/editor/editor_audio_buses.h
+++ b/editor/editor_audio_buses.h
@@ -29,27 +29,26 @@
#ifndef EDITORAUDIOBUSES_H
#define EDITORAUDIOBUSES_H
-
+#include "editor/editor_file_dialog.h"
+#include "editor_plugin.h"
#include "scene/gui/box_container.h"
#include "scene/gui/button.h"
-#include "scene/gui/tool_button.h"
-#include "scene/gui/scroll_container.h"
+#include "scene/gui/line_edit.h"
+#include "scene/gui/option_button.h"
+#include "scene/gui/panel.h"
#include "scene/gui/panel_container.h"
+#include "scene/gui/scroll_container.h"
#include "scene/gui/slider.h"
#include "scene/gui/texture_progress.h"
#include "scene/gui/texture_rect.h"
-#include "scene/gui/line_edit.h"
+#include "scene/gui/tool_button.h"
#include "scene/gui/tree.h"
-#include "scene/gui/option_button.h"
-#include "scene/gui/panel.h"
-#include "editor/editor_file_dialog.h"
-#include "editor_plugin.h"
class EditorAudioBuses;
class EditorAudioBus : public PanelContainer {
- GDCLASS( EditorAudioBus, PanelContainer )
+ GDCLASS(EditorAudioBus, PanelContainer)
bool prev_active;
float peak_l;
@@ -75,10 +74,10 @@ class EditorAudioBus : public PanelContainer {
bool updating_bus;
- void _gui_input(const InputEvent& p_event);
+ void _gui_input(const InputEvent &p_event);
void _delete_pressed(int p_option);
- void _name_changed(const String& p_new_name);
+ void _name_changed(const String &p_new_name);
void _name_focus_exit() { _name_changed(track_name->get_text()); }
void _volume_db_changed(float p_db);
void _solo_toggled();
@@ -89,52 +88,48 @@ class EditorAudioBus : public PanelContainer {
void _effect_add(int p_which);
void _effect_selected();
void _delete_effect_pressed(int p_option);
- void _effect_rmb(const Vector2& p_pos);
-
-
- virtual Variant get_drag_data(const Point2& p_point);
- virtual bool can_drop_data(const Point2& p_point,const Variant& p_data) const;
- virtual void drop_data(const Point2& p_point,const Variant& p_data);
+ void _effect_rmb(const Vector2 &p_pos);
+ virtual Variant get_drag_data(const Point2 &p_point);
+ virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const;
+ virtual void drop_data(const Point2 &p_point, const Variant &p_data);
- Variant get_drag_data_fw(const Point2& p_point,Control* p_from);
- bool can_drop_data_fw(const Point2& p_point,const Variant& p_data,Control* p_from) const;
- void drop_data_fw(const Point2& p_point,const Variant& p_data,Control* p_from);
+ Variant get_drag_data_fw(const Point2 &p_point, Control *p_from);
+ bool can_drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from) const;
+ void drop_data_fw(const Point2 &p_point, const Variant &p_data, Control *p_from);
-friend class EditorAudioBuses;
+ friend class EditorAudioBuses;
EditorAudioBuses *buses;
protected:
-
static void _bind_methods();
void _notification(int p_what);
-public:
+public:
void update_bus();
void update_send();
- EditorAudioBus(EditorAudioBuses *p_buses=NULL);
+ EditorAudioBus(EditorAudioBuses *p_buses = NULL);
};
-
class EditorAudioBusDrop : public Panel {
- GDCLASS(EditorAudioBusDrop,Panel);
+ GDCLASS(EditorAudioBusDrop, Panel);
- virtual bool can_drop_data(const Point2& p_point,const Variant& p_data) const;
- virtual void drop_data(const Point2& p_point,const Variant& p_data);
-protected:
+ virtual bool can_drop_data(const Point2 &p_point, const Variant &p_data) const;
+ virtual void drop_data(const Point2 &p_point, const Variant &p_data);
+protected:
static void _bind_methods();
-public:
+public:
EditorAudioBusDrop();
};
-class EditorAudioBuses : public VBoxContainer {
+class EditorAudioBuses : public VBoxContainer {
- GDCLASS(EditorAudioBuses,VBoxContainer)
+ GDCLASS(EditorAudioBuses, VBoxContainer)
HBoxContainer *top_hb;
@@ -158,12 +153,11 @@ class EditorAudioBuses : public VBoxContainer {
void _update_bus(int p_index);
void _update_sends();
- void _delete_bus(Object* p_which);
+ void _delete_bus(Object *p_which);
void _duplicate_bus(int p_which);
-
void _request_drop_end();
- void _drop_at_index(int p_bus,int p_index);
+ void _drop_at_index(int p_bus, int p_index);
void _server_save();
@@ -176,30 +170,27 @@ class EditorAudioBuses : public VBoxContainer {
EditorFileDialog *file_dialog;
bool new_layout;
- void _file_dialog_callback(const String& p_string);
+ void _file_dialog_callback(const String &p_string);
protected:
-
static void _bind_methods();
void _notification(int p_what);
-public:
- void open_layout(const String& p_path);
+public:
+ void open_layout(const String &p_path);
- static EditorAudioBuses* register_editor();
+ static EditorAudioBuses *register_editor();
EditorAudioBuses();
};
-
-
class AudioBusesEditorPlugin : public EditorPlugin {
- GDCLASS( AudioBusesEditorPlugin, EditorPlugin );
+ GDCLASS(AudioBusesEditorPlugin, EditorPlugin);
EditorAudioBuses *audio_bus_editor;
-public:
+public:
virtual String get_name() const { return "SampleLibrary"; }
bool has_main_screen() const { return false; }
virtual void edit(Object *p_node);
@@ -208,7 +199,6 @@ public:
AudioBusesEditorPlugin(EditorAudioBuses *p_node);
~AudioBusesEditorPlugin();
-
};
#endif // EDITORAUDIOBUSES_H