GFC Logo GFC Title Logo
Reference Manual
Main Page  |  Namespace List  |  Alphabetical List  |  Class List  |  File List

style.hh

Go to the documentation of this file.
00001 /* GFC-UI: GTK+ Foundation Classes (User Interface Library) 00002 * Copyright (C) 2002-2004 The GFC Development Team. 00003 * 00004 * This program is free software; you can redistribute it and/or modify 00005 * it under the terms of the GNU General Public License as published by 00006 * the Free Software Foundation; either version 2 of the License, or 00007 * (at your option) any later version. 00008 * 00009 * This program is distributed in the hope that it will be useful, 00010 * but WITHOUT ANY WARRANTY; without even the implied warranty of 00011 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 00012 * GNU Library General Public License for more details. 00013 * 00014 * You should have received a copy of the GNU Library General Public License 00015 * along with this program; if not, write to the Free Software 00016 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. 00017 */ 00018 00023 00024 #ifndef GFC_GTK_STYLE_HH 00025 #define GFC_GTK_STYLE_HH 00026 00027 #ifndef GFC_GDK_COLOR_HH 00028 #include <gfc/gdk/color.hh> 00029 #endif 00030 00031 #ifndef GFC_GDK_TYPES_HH 00032 #include <gfc/gdk/types.hh> 00033 #endif 00034 00035 #ifndef GFC_GTK_ENUMS_HH 00036 #include <gfc/gtk/enums.hh> 00037 #endif 00038 00039 #ifndef __GTK_STYLE_H__ 00040 #include <gtk/gtkstyle.h> 00041 #endif 00042 00043 namespace GFC { 00044 00045 namespace Gdk { 00046 class Drawable; 00047 class GC; 00048 class Pixbuf; 00049 class Pixmap; 00050 class Rectangle; 00051 class Window; 00052 } 00053 00054 namespace Pango { 00055 class FontDescription; 00056 class Layout; 00057 } 00058 00059 namespace Gtk { 00060 00061 class IconSet; 00062 class IconSource; 00063 class StockId; 00064 class Widget; 00065 00068 00069 void draw_insertion_cursor 00070 ( 00071 Widget& widget, 00072 Gdk::Drawable& drawable, 00073 const Gdk::Rectangle& location, 00074 bool is_primary, 00075 TextDirection direction, 00076 bool draw_arrow, 00077 const Gdk::Rectangle *area = 0 00078 ); 00092 00094 00104 00105 class Style : public G::Object 00106 { 00107 friend class G::Object; 00108 00109 Style(const Style&); 00110 Style& operator=(const Style&); 00111 00112 protected: 00115 00116 explicit Style(GtkStyle *style, bool owns_reference = true); 00123 00125 00126 public: 00129 00130 virtual ~Style(); 00132 00136 00137 GtkStyle* gtk_style() const; 00139 00140 operator GtkStyle* () const; 00142 00143 Gdk::Color fg(StateType state_type) const; 00147 00148 Gdk::Color bg(StateType state_type) const; 00152 00153 Gdk::Color light(StateType state_type) const; 00157 00158 Gdk::Color dark(StateType state_type) const; 00162 00163 Gdk::Color mid(StateType state_type) const; 00167 00168 Gdk::Color text(StateType state_type) const; 00172 00173 Gdk::Color base(StateType state_type) const; 00177 00178 Gdk::Color text_aa(StateType state_type) const; 00182 00183 Gdk::Color black() const; 00186 00187 Gdk::Color white() const; 00190 00191 Pointer<Pango::FontDescription> font_desc() const; 00193 00194 Gdk::GC* black_gc() const; 00196 00197 Gdk::GC* white_gc() const; 00199 00200 Gdk::GC* fg_gc(StateType state_type) const; 00204 00205 Gdk::GC* bg_gc(StateType state_type) const; 00209 00210 Gdk::GC* light_gc(StateType state_type) const; 00214 00215 Gdk::GC* dark_gc(StateType state_type) const; 00219 00220 Gdk::GC* mid_gc(StateType state_type) const; 00224 00225 Gdk::GC* text_gc(StateType state_type) const; 00229 00230 Gdk::GC* base_gc(StateType state_type) const; 00234 00235 Gdk::GC* text_aa_gc(StateType state_type) const; 00239 00240 Gdk::Pixmap* bg_pixmap(StateType state_type) const; 00244 00248 00249 Pointer<Style> copy() const; 00251 00252 void attach(const Gdk::Window& window); 00270 00271 void set_background(Gdk::Window& window, StateType state_type); 00276 00277 Pointer<IconSet> lookup_icon_set(const StockId& stock_id); 00280 00281 void apply_default_background 00282 ( 00283 Gdk::Window& window, 00284 bool set_bg, 00285 StateType state_type, 00286 int x, 00287 int y, 00288 int width, 00289 int height, 00290 const Gdk::Rectangle *area = 0 00291 ); 00304 00305 Pointer<Gdk::Pixbuf> render_icon 00306 ( 00307 const IconSource& source, 00308 TextDirection direction, 00309 StateType state, 00310 IconSize size, 00311 Widget *widget = 0, 00312 const char *detail = 0 00313 ); 00325 00326 void draw_hline 00327 ( 00328 Gdk::Window& window, 00329 StateType state_type, 00330 int x1, 00331 int x2, 00332 int y, 00333 const Gdk::Rectangle *area = 0, 00334 Widget *widget = 0, 00335 const char *detail = 0 00336 ); 00346 00347 void draw_vline 00348 ( 00349 Gdk::Window& window, 00350 StateType state_type, 00351 int y1, 00352 int y2, 00353 int x, 00354 const Gdk::Rectangle *area = 0, 00355 Widget *widget = 0, 00356 const char *detail = 0 00357 ); 00367 00368 void draw_shadow 00369 ( 00370 Gdk::Window& window, 00371 StateType state_type, 00372 ShadowType shadow_type, 00373 int x, 00374 int y, 00375 int width, 00376 int height, 00377 const Gdk::Rectangle *area = 0, 00378 Widget *widget = 0, 00379 const char *detail = 0 00380 ); 00392 00393 void draw_polygon 00394 ( 00395 Gdk::Window& window, 00396 StateType state_type, 00397 ShadowType shadow_type, 00398 const Gdk::Point *points, 00399 int npoints, 00400 bool fill, 00401 const Gdk::Rectangle *area = 0, 00402 Widget *widget = 0, 00403 const char *detail = 0 00404 ); 00415 00416 void draw_arrow 00417 ( 00418 Gdk::Window& window, 00419 StateType state_type, 00420 ShadowType shadow_type, 00421 ArrowType arrow_type, 00422 bool fill, 00423 int x, 00424 int y, 00425 int width, 00426 int height, 00427 const Gdk::Rectangle *area = 0, 00428 Widget *widget = 0, 00429 const char *detail = 0 00430 ); 00445 00446 void draw_diamond 00447 ( 00448 Gdk::Window& window, 00449 StateType state_type, 00450 ShadowType shadow_type, 00451 int x, 00452 int y, 00453 int width, 00454 int height, 00455 const Gdk::Rectangle *area = 0, 00456 Widget *widget = 0, 00457 const char *detail = 0 00458 ); 00470 00471 void draw_box 00472 ( 00473 Gdk::Window& window, 00474 StateType state_type, 00475 ShadowType shadow_type, 00476 int x, 00477 int y, 00478 int width, 00479 int height, 00480 const Gdk::Rectangle *area = 0, 00481 Widget *widget = 0, 00482 const char *detail = 0 00483 ); 00495 00496 void draw_flat_box 00497 ( 00498 Gdk::Window& window, 00499 StateType state_type, 00500 ShadowType shadow_type, 00501 int x, 00502 int y, 00503 int width, 00504 int height, 00505 const Gdk::Rectangle *area = 0, 00506 Widget *widget = 0, 00507 const char *detail = 0 00508 ); 00520 00521 void draw_check 00522 ( 00523 Gdk::Window& window, 00524 StateType state_type, 00525 ShadowType shadow_type, 00526 int x, 00527 int y, 00528 int width, 00529 int height, 00530 const Gdk::Rectangle *area = 0, 00531 Widget *widget = 0, 00532 const char *detail = 0 00533 ); 00545 00546 void draw_option 00547 ( 00548 Gdk::Window& window, 00549 StateType state_type, 00550 ShadowType shadow_type, 00551 int x, 00552 int y, 00553 int width, 00554 int height, 00555 const Gdk::Rectangle *area = 0, 00556 Widget *widget = 0, 00557 const char *detail = 0 00558 ); 00570 00571 void draw_tab 00572 ( 00573 Gdk::Window& window, 00574 StateType state_type, 00575 ShadowType shadow_type, 00576 int x, 00577 int y, 00578 int width, 00579 int height, 00580 const Gdk::Rectangle *area = 0, 00581 Widget *widget = 0, 00582 const char *detail = 0 00583 ); 00596 00597 void draw_shadow_gap 00598 ( 00599 Gdk::Window& window, 00600 StateType state_type, 00601 ShadowType shadow_type, 00602 int x, 00603 int y, 00604 int width, 00605 int height, 00606 PositionType gap_side, 00607 int gap_x, 00608 int gap_width, 00609 const Gdk::Rectangle *area = 0, 00610 Widget *widget = 0, 00611 const char *detail = 0 00612 ); 00627 00628 void draw_box_gap 00629 ( 00630 Gdk::Window& window, 00631 StateType state_type, 00632 ShadowType shadow_type, 00633 int x, 00634 int y, 00635 int width, 00636 int height, 00637 PositionType gap_side, 00638 int gap_x, 00639 int gap_width, 00640 const Gdk::Rectangle *area = 0, 00641 Widget *widget = 0, 00642 const char *detail = 0 00643 ); 00658 00659 void draw_extension 00660 ( 00661 Gdk::Window& window, 00662 StateType state_type, 00663 ShadowType shadow_type, 00664 int x, 00665 int y, 00666 int width, 00667 int height, 00668 PositionType gap_side, 00669 const Gdk::Rectangle *area = 0, 00670 Widget *widget = 0, 00671 const char *detail = 0 00672 ); 00685 00686 void draw_focus 00687 ( 00688 Gdk::Window& window, 00689 StateType state_type, 00690 int x, 00691 int y, 00692 int width, 00693 int height, 00694 const Gdk::Rectangle *area = 0, 00695 Widget *widget = 0, 00696 const char *detail = 0 00697 ); 00708 00709 void draw_slider 00710 ( 00711 Gdk::Window& window, 00712 StateType state_type, 00713 ShadowType shadow_type, 00714 int x, 00715 int y, 00716 int width, 00717 int height, 00718 Orientation orientation, 00719 const Gdk::Rectangle *area = 0, 00720 Widget *widget = 0, 00721 const char *detail = 0 00722 ); 00735 00736 void draw_handle 00737 ( 00738 Gdk::Window& window, 00739 StateType state_type, 00740 ShadowType shadow_type, 00741 int x, 00742 int y, 00743 int width, 00744 int height, 00745 Orientation orientation, 00746 const Gdk::Rectangle *area = 0, 00747 Widget *widget = 0, 00748 const char *detail = 0 00749 ); 00762 00763 void draw_expander 00764 ( 00765 Gdk::Window& window, 00766 StateType state_type, 00767 int x, 00768 int y, 00769 ExpanderStyle expander_style, 00770 const Gdk::Rectangle *area = 0, 00771 Widget *widget = 0, 00772 const char *detail = 0 00773 ); 00783 00784 void draw_layout 00785 ( 00786 Gdk::Window& window, 00787 StateType state_type, 00788 bool use_text, 00789 int x, 00790 int y, 00791 Pango::Layout& layout, 00792 const Gdk::Rectangle *area = 0, 00793 Widget *widget = 0, 00794 const char *detail = 0 00795 ); 00806 00807 void draw_resize_grip 00808 ( 00809 Gdk::Window& window, 00810 StateType state_type, 00811 Gdk::WindowEdge edge, 00812 int x, 00813 int y, 00814 int width, 00815 int height, 00816 const Gdk::Rectangle *area = 0, 00817 Widget *widget = 0, 00818 const char *detail = 0 00819 ); 00831 00833 }; 00834 00835 } // namespace Gtk 00836 00837 } // namespace GFC 00838 00839 #include <gfc/gtk/inline/style.inl> 00840 00841 #endif // GFC_GTK_STYLE_HH 00842

Generated on Tue Aug 24 00:34:32 2004 for GFC-UI by doxygen 1.3.8