godot/editor/plugins/curve_editor_plugin.cpp

/**************************************************************************/
/*  curve_editor_plugin.cpp                                               */
/**************************************************************************/
/*                         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.                 */
/**************************************************************************/

#include "curve_editor_plugin.h"

#include "canvas_item_editor_plugin.h"
#include "core/input/input.h"
#include "core/math/geometry_2d.h"
#include "core/os/keyboard.h"
#include "editor/editor_interface.h"
#include "editor/editor_node.h"
#include "editor/editor_settings.h"
#include "editor/editor_string_names.h"
#include "editor/editor_undo_redo_manager.h"
#include "editor/gui/editor_spin_slider.h"
#include "editor/themes/editor_scale.h"
#include "scene/gui/flow_container.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/popup_menu.h"
#include "scene/gui/separator.h"
#include "scene/resources/image_texture.h"

CurveEdit::CurveEdit() {}

void CurveEdit::_bind_methods() {}

void CurveEdit::set_curve(Ref<Curve> p_curve) {}

Ref<Curve> CurveEdit::get_curve() {}

void CurveEdit::set_snap_enabled(bool p_enabled) {}

void CurveEdit::set_snap_count(int p_snap_count) {}

Size2 CurveEdit::get_minimum_size() const {}

void CurveEdit::_notification(int p_what) {}

void CurveEdit::gui_input(const Ref<InputEvent> &p_event) {}

void CurveEdit::use_preset(int p_preset_id) {}

void CurveEdit::_curve_changed() {}

int CurveEdit::get_point_at(const Vector2 &p_pos) const {}

CurveEdit::TangentIndex CurveEdit::get_tangent_at(const Vector2 &p_pos) const {}

// FIXME: This function should be bounded better.
float CurveEdit::get_offset_without_collision(int p_current_index, float p_offset, bool p_prioritize_right) {}

void CurveEdit::add_point(const Vector2 &p_pos) {}

void CurveEdit::remove_point(int p_index) {}

void CurveEdit::set_point_position(int p_index, const Vector2 &p_pos) {}

void CurveEdit::set_point_tangents(int p_index, float p_left, float p_right) {}

void CurveEdit::set_point_left_tangent(int p_index, float p_tangent) {}

void CurveEdit::set_point_right_tangent(int p_index, float p_tangent) {}

void CurveEdit::toggle_linear(int p_index, TangentIndex p_tangent) {}

void CurveEdit::set_selected_index(int p_index) {}

void CurveEdit::update_view_transform() {}

Vector2 CurveEdit::get_tangent_view_pos(int p_index, TangentIndex p_tangent) const {}

Vector2 CurveEdit::get_view_pos(const Vector2 &p_world_pos) const {}

Vector2 CurveEdit::get_world_pos(const Vector2 &p_view_pos) const {}

// Uses non-baked points, but takes advantage of ordered iteration to be faster.
void CurveEdit::plot_curve_accurate(float p_step, const Color &p_line_color, const Color &p_edge_line_color) {}

void CurveEdit::_redraw() {}

///////////////////////

const int CurveEditor::DEFAULT_SNAP =;

void CurveEditor::_set_snap_enabled(bool p_enabled) {}

void CurveEditor::_set_snap_count(int p_snap_count) {}

void CurveEditor::_on_preset_item_selected(int p_preset_id) {}

void CurveEditor::set_curve(const Ref<Curve> &p_curve) {}

void CurveEditor::_notification(int p_what) {}

CurveEditor::CurveEditor() {}

///////////////////////

bool EditorInspectorPluginCurve::can_handle(Object *p_object) {}

void EditorInspectorPluginCurve::parse_begin(Object *p_object) {}

CurveEditorPlugin::CurveEditorPlugin() {}

///////////////////////

bool CurvePreviewGenerator::handles(const String &p_type) const {}

Ref<Texture2D> CurvePreviewGenerator::generate(const Ref<Resource> &p_from, const Size2 &p_size, Dictionary &p_metadata) const {}