X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=synfig-studio%2Ftrunk%2Fsrc%2Fgtkmm%2Fworkarea.h;h=6e5ab7f746e234c28bf61526559c0eb8fa3ff13c;hb=990f7bb7694e0472ed6ad165e0724864539071cd;hp=bb07f3ce1f93ac241cac7615f4eca9ea11030bec;hpb=ce408de81ca266b1f334ee9bc6c8fb7ba1492ed4;p=synfig.git diff --git a/synfig-studio/trunk/src/gtkmm/workarea.h b/synfig-studio/trunk/src/gtkmm/workarea.h index bb07f3c..6e5ab7f 100644 --- a/synfig-studio/trunk/src/gtkmm/workarea.h +++ b/synfig-studio/trunk/src/gtkmm/workarea.h @@ -2,10 +2,11 @@ /*! \file workarea.h ** \brief Template Header ** -** $Id: workarea.h,v 1.1.1.1 2005/01/07 03:34:37 darco Exp $ +** $Id$ ** ** \legal ** Copyright (c) 2002-2005 Robert B. Quattlebaum Jr., Adrian Bentley +** Copyright (c) 2007, 2008 Chris Moore ** ** This package is free software; you can redistribute it and/or ** modify it under the terms of the GNU General Public License as @@ -69,13 +70,11 @@ public: typedef etl::loose_handle first_argument_type; typedef etl::loose_handle second_argument_type; typedef bool result_type; - + } }; */ -class WorkAreaTarget; -class WorkAreaTarget_Full; namespace synfigapp { class CanvasInterface; }; namespace synfig { class Layer; }; @@ -83,6 +82,9 @@ namespace Gtk { class Frame; }; namespace studio { +class WorkAreaTarget; +class WorkAreaTarget_Full; + class Instance; class CanvasView; class WorkArea; @@ -104,11 +106,12 @@ class WorkArea : public Gtk::Table, public Duckmatic friend class WorkAreaTarget_Full; friend class DirtyTrap; friend class WorkAreaRenderer; - + friend class WorkAreaProgress; + /* -- ** -- P U B L I C T Y P E S --------------------------------------------- */ - + public: void insert_renderer(const etl::handle &x); @@ -151,7 +154,7 @@ private: Gtk::Frame *drawing_frame; GdkDevice* curr_input_device; - + // Bleh! int w; //!< Width of the image (in pixels) int h; //!< Height of the image (in pixels) @@ -168,17 +171,17 @@ private: int bpp; //unsigned char *buffer; - + //! ??? synfig::ProgressCallback *progresscallback; //! ??? synfig::RendDesc desc; - + //! This flag is set if the user is dragging the video window /*! \see drag_point */ DragMode dragging; - + etl::handle clicked_duck; etl::handle hover_duck; @@ -197,23 +200,23 @@ private: bool show_guides; bool low_resolution; - + bool meta_data_lock; - //! This flag is set if the entire frame is rendered rather than using tiles + //! This flag is set if the entire frame is rendered rather than using tiles bool full_frame; - + //Glib::RefPtr pix_buf; - + //! This vector holds all of the tiles for this image std::vector< std::pair,int> > tile_book; //! This integer describes the total times that the work are has been refreshed int refreshes; - + //! This list holds the queue of tiles that need to be rendered //std::list tile_queue; - + int tile_w, tile_h; gint render_idle_func_id; @@ -222,18 +225,26 @@ private: synfig::Point last_focus_point; bool canceled_; - + int quality; + int low_res_pixel_size; bool dirty_trap_enabled; - + int dirty_trap_queued; - - + + bool onion_skin; - + etl::loose_handle selected_value_node_; + bool allow_duck_clicks; + bool allow_layer_clicks; + bool cancel; + bool curr_guide_is_x; + bool dirty; + bool queued; + bool rendering; /* -- ** -- P U B L I C D A T A ----------------------------------------------- @@ -248,23 +259,31 @@ public: bool get_canceled()const { return canceled_; } bool get_queued()const { return queued; } bool get_rendering()const { return rendering; } +#ifdef SINGLE_THREADED + bool get_updating()const; + void stop_updating(bool cancel = false); +#endif bool get_full_frame()const { return full_frame; } //int get_w()const { return w; } //int get_h()const { return h; } int get_tile_w()const { return tile_w; } int get_tile_h()const { return tile_h; } - + + bool get_allow_layer_clicks() { return allow_layer_clicks; } + void set_allow_layer_clicks(bool value) { allow_layer_clicks=value; } + + bool get_allow_duck_clicks() { return allow_duck_clicks; } + void set_allow_duck_clicks(bool value) { allow_duck_clicks=value; } + + // used in renderer_ducks.cpp bool solid_lines; - bool rendering; - bool dirty; - bool queued; - bool cancel; - bool allow_layer_clicks; - bool allow_duck_clicks; + // used in renderer_guides.cpp GuideList::iterator curr_guide; - bool curr_guide_is_x; + + // used in renderer_timecode.cpp + int timecode_width, timecode_height; /* -- ** -- P R I V A T E M E T H O D S --------------------------------------- @@ -357,16 +376,16 @@ public: etl::loose_handle get_canvas_view()const { return canvas_view; } void refresh_dimension_info(); - + //! Enables showing of the grid void enable_grid(); - + //! Disables showing of the grid void disable_grid(); - + //! Toggles the showing of the grid void toggle_grid(); - + //! Returns the state of the show_grid flag bool grid_status()const { return show_grid; } @@ -375,24 +394,26 @@ public: bool get_show_guides()const { return show_guides; } void set_show_guides(bool x); void toggle_show_guides() { set_show_guides(!get_show_guides()); } - + bool get_low_resolution_flag()const { return low_resolution; } void set_low_resolution_flag(bool x); void toggle_low_resolution_flag(); - + //! ??? void queue_scroll(); - + //! Sets the size of the grid void set_grid_size(const synfig::Vector &s); - + //! ?? void popup_menu(); - + int get_quality()const { return quality; } + int get_low_res_pixel_size()const { return low_res_pixel_size; } void set_quality(int x); - + void set_low_res_pixel_size(int x); + int get_w()const { return w; } int get_h()const { return h; } @@ -400,10 +421,10 @@ public: //! ?? const synfig::RendDesc &get_rend_desc()const { return desc; } - + //! ?? void set_rend_desc(const synfig::RendDesc &x) { desc=x; } - + //! Converts screen coords (ie: pixels) to composition coordinates synfig::Point screen_to_comp_coords(synfig::Point pos)const; @@ -412,7 +433,7 @@ public: float get_pw()const { return pw; } float get_ph()const { return ph; } - + const synfig::Point &get_window_tl()const { return window_tl; } const synfig::Point &get_window_br()const { return window_br; } @@ -421,23 +442,23 @@ public: void async_update_finished(); void async_render_preview(synfig::Time time); void async_render_preview(); - + bool sync_update_preview(); bool sync_render_preview(synfig::Time time); bool sync_render_preview(); void sync_render_preview_hook(); void queue_render_preview(); - - + + void queue_draw_preview(); - + void zoom_in(); void zoom_out(); void zoom_fit(); void zoom_norm(); float get_zoom()const { return zoom; } - + void set_zoom(float z); @@ -449,15 +470,15 @@ public: synfig::Point get_focus_point()const; void done_rendering(); - + bool refresh(GdkEventExpose*bleh=NULL); - + void reset_cursor(); void refresh_cursor(); void save_meta_data(); void load_meta_data(); - + /* -- ** -- S I G N A L T E R M I N A L S ------------------------------------- */