X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fworkarea.h;h=daeb90608f456da4ef5e6d2f6b07f7430a869ccf;hb=4f3b3b5603d5f0bb0dd7fe6f48b2af243cbd41cf;hp=8e1da79e240e944ccca97a9bcfdb798d6d1f58ea;hpb=3a3c4bca3a17137bec5d7960560934b91ef4146e;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/workarea.h b/synfig-studio/trunk/src/gtkmm/workarea.h index 8e1da79..daeb906 100644 --- a/synfig-studio/trunk/src/gtkmm/workarea.h +++ b/synfig-studio/trunk/src/gtkmm/workarea.h @@ -1,28 +1,29 @@ -/* === S I N F G =========================================================== */ +/* === S Y N F I G ========================================================= */ /*! \file workarea.h ** \brief Template Header ** ** $Id: workarea.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $ ** ** \legal -** Copyright (c) 2002 Robert B. Quattlebaum Jr. +** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley ** -** This software and associated documentation -** are CONFIDENTIAL and PROPRIETARY property of -** the above-mentioned copyright holder. +** This package is free software; you can redistribute it and/or +** modify it under the terms of the GNU General Public License as +** published by the Free Software Foundation; either version 2 of +** the License, or (at your option) any later version. ** -** You may not copy, print, publish, or in any -** other way distribute this software without -** a prior written agreement with -** the copyright holder. +** This package is distributed in the hope that it will be useful, +** but WITHOUT ANY WARRANTY; without even the implied warranty of +** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +** General Public License for more details. ** \endlegal */ /* ========================================================================= */ /* === S T A R T =========================================================== */ -#ifndef __SINFG_GTKMM_WORKAREA_H -#define __SINFG_GTKMM_WORKAREA_H +#ifndef __SYNFIG_GTKMM_WORKAREA_H +#define __SYNFIG_GTKMM_WORKAREA_H /* === H E A D E R S ======================================================= */ @@ -42,11 +43,11 @@ #include #include -#include -#include -#include -#include -#include +#include +#include +#include +#include +#include #include "zoomdial.h" #include "duckmatic.h" @@ -73,15 +74,16 @@ public: }; */ -class WorkAreaTarget; -class WorkAreaTarget_Full; -namespace sinfgapp { class CanvasInterface; }; +namespace synfigapp { class CanvasInterface; }; -namespace sinfg { class Layer; }; +namespace synfig { class Layer; }; namespace Gtk { class Frame; }; namespace studio { +class WorkAreaTarget; +class WorkAreaTarget_Full; + class Instance; class CanvasView; class WorkArea; @@ -135,8 +137,8 @@ private: etl::handle async_renderer; - etl::loose_handle canvas_interface; - etl::handle canvas; + etl::loose_handle canvas_interface; + etl::handle canvas; etl::loose_handle instance; etl::loose_handle canvas_view; @@ -154,14 +156,14 @@ private: // Bleh! int w; //!< Width of the image (in pixels) int h; //!< Height of the image (in pixels) - sinfg::Real canvaswidth; //!< Width of the canvas - sinfg::Real canvasheight; //!< Height of the canvas - sinfg::Real pw; //!< The width of a pixel - sinfg::Real ph; //!< The height of a pixel + synfig::Real canvaswidth; //!< Width of the canvas + synfig::Real canvasheight; //!< Height of the canvas + synfig::Real pw; //!< The width of a pixel + synfig::Real ph; //!< The height of a pixel float zoom; //!< Zoom factor float prev_zoom; //!< Previous Zoom factor - sinfg::Point window_tl; //!< The (theoretical) top-left corner of the view window - sinfg::Point window_br; //!< The (theoretical) bottom-right corner of the view window + synfig::Point window_tl; //!< The (theoretical) top-left corner of the view window + synfig::Point window_br; //!< The (theoretical) bottom-right corner of the view window guint32 last_event_time; @@ -169,10 +171,10 @@ private: //unsigned char *buffer; //! ??? - sinfg::ProgressCallback *progresscallback; + synfig::ProgressCallback *progresscallback; //! ??? - sinfg::RendDesc desc; + synfig::RendDesc desc; //! This flag is set if the user is dragging the video window /*! \see drag_point */ @@ -182,12 +184,12 @@ private: etl::handle hover_duck; //! When dragging the viewport, this is set to the origin of the drag - sinfg::Point drag_point; + synfig::Point drag_point; - sinfg::Point curr_point; + synfig::Point curr_point; //! ??? - sinfg::Point previous_focus; + synfig::Point previous_focus; //! This flag is set if the grid should be drawn bool show_grid; @@ -218,7 +220,7 @@ private: gint render_idle_func_id; //! The coordinates of the focus the last time a part of the screen was refreshed - sinfg::Point last_focus_point; + synfig::Point last_focus_point; bool canceled_; @@ -231,7 +233,7 @@ private: bool onion_skin; - etl::loose_handle selected_value_node_; + etl::loose_handle selected_value_node_; /* @@ -240,8 +242,8 @@ private: public: - const etl::loose_handle& get_selected_value_node() { return selected_value_node_; } - const sinfg::Point& get_drag_point()const { return drag_point; } + const etl::loose_handle& get_selected_value_node() { return selected_value_node_; } + const synfig::Point& get_drag_point()const { return drag_point; } std::vector< std::pair,int> >& get_tile_book(){ return tile_book; } int get_refreshes()const { return refreshes; } bool get_canceled()const { return canceled_; } @@ -286,7 +288,7 @@ private: sigc::signal signal_input_device_changed_; //! One signal per button - sigc::signal signal_user_click_[5]; + sigc::signal signal_user_click_[5]; sigc::signal signal_popup_menu_; @@ -296,7 +298,7 @@ private: sigc::signal signal_onion_skin_changed_; //! Signal for when the user clicks on a layer - sigc::signal > signal_layer_selected_; + sigc::signal > signal_layer_selected_; sigc::signal signal_view_window_changed_; @@ -316,9 +318,9 @@ public: sigc::signal &signal_popup_menu() { return signal_popup_menu_; } //! One signal per button (5 buttons) - sigc::signal &signal_user_click(int button=0){ return signal_user_click_[button]; } + sigc::signal &signal_user_click(int button=0){ return signal_user_click_[button]; } - sigc::signal >& signal_layer_selected() { return signal_layer_selected_; } + sigc::signal >& signal_layer_selected() { return signal_layer_selected_; } /* -- ** -- P U B L I C M E T H O D S ----------------------------------------- @@ -329,19 +331,19 @@ public: bool get_onion_skin()const; void toggle_onion_skin() { set_onion_skin(!get_onion_skin()); } - void set_selected_value_node(etl::loose_handle x); + void set_selected_value_node(etl::loose_handle x); bool is_dragging() { return dragging!=DRAG_NONE; } DragMode get_dragging_mode() { return dragging; } - WorkArea(etl::loose_handle canvas_interface); + WorkArea(etl::loose_handle canvas_interface); virtual ~WorkArea(); void set_cursor(const Gdk::Cursor& x); void set_cursor(Gdk::CursorType x); - const sinfg::Point& get_cursor_pos()const { return curr_point; } + const synfig::Point& get_cursor_pos()const { return curr_point; } Gtk::Adjustment *get_scrollx_adjustment() { return &scrollx_adjustment; } Gtk::Adjustment *get_scrolly_adjustment() { return &scrolly_adjustment; } @@ -349,9 +351,9 @@ public: const Gtk::Adjustment *get_scrolly_adjustment()const { return &scrolly_adjustment; } void set_instance(etl::loose_handle x) { instance=x; } - void set_canvas(etl::handle x) { canvas=x; } + void set_canvas(etl::handle x) { canvas=x; } void set_canvas_view(etl::loose_handle x) { canvas_view=x; } - etl::handle get_canvas()const { return canvas; } + etl::handle get_canvas()const { return canvas; } etl::handle get_instance()const { return instance; } etl::loose_handle get_canvas_view()const { return canvas_view; } @@ -383,7 +385,7 @@ public: void queue_scroll(); //! Sets the size of the grid - void set_grid_size(const sinfg::Vector &s); + void set_grid_size(const synfig::Vector &s); //! ?? void popup_menu(); @@ -398,31 +400,31 @@ public: int get_bpp()const { return bpp; } //! ?? - const sinfg::RendDesc &get_rend_desc()const { return desc; } + const synfig::RendDesc &get_rend_desc()const { return desc; } //! ?? - void set_rend_desc(const sinfg::RendDesc &x) { desc=x; } + void set_rend_desc(const synfig::RendDesc &x) { desc=x; } //! Converts screen coords (ie: pixels) to composition coordinates - sinfg::Point screen_to_comp_coords(sinfg::Point pos)const; + synfig::Point screen_to_comp_coords(synfig::Point pos)const; //! Converts composition coordinates to screen coords (ie: pixels) - sinfg::Point comp_to_screen_coords(sinfg::Point pos)const; + synfig::Point comp_to_screen_coords(synfig::Point pos)const; float get_pw()const { return pw; } float get_ph()const { return ph; } - const sinfg::Point &get_window_tl()const { return window_tl; } - const sinfg::Point &get_window_br()const { return window_br; } + const synfig::Point &get_window_tl()const { return window_tl; } + const synfig::Point &get_window_br()const { return window_br; } bool async_update_preview(); void async_update_finished(); - void async_render_preview(sinfg::Time time); + void async_render_preview(synfig::Time time); void async_render_preview(); bool sync_update_preview(); - bool sync_render_preview(sinfg::Time time); + bool sync_render_preview(synfig::Time time); bool sync_render_preview(); void sync_render_preview_hook(); @@ -440,12 +442,12 @@ public: void set_zoom(float z); - void set_progress_callback(sinfg::ProgressCallback *x) { progresscallback=x; } - sinfg::ProgressCallback *get_progress_callback() { return progresscallback; } + void set_progress_callback(synfig::ProgressCallback *x) { progresscallback=x; } + synfig::ProgressCallback *get_progress_callback() { return progresscallback; } - void set_focus_point(const sinfg::Point &x); + void set_focus_point(const synfig::Point &x); - sinfg::Point get_focus_point()const; + synfig::Point get_focus_point()const; void done_rendering();