Reference Manual

Main Page | Namespace List | Class Hierarchy | Alphabetical List | Compound List | File List | Namespace Members | Compound Members | File Members

# style.h

Go to the documentation of this file.

    00001 /*  Inti: Integrated Foundation Classes
    00002  *  Copyright (C) 2002 The Inti 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 INTI_GTK_STYLE_H
    00025 #define INTI_GTK_STYLE_H
    00026
    00027 #ifndef INTI_G_OBJECT_H
    00028 #include <inti/glib/object.h>
    00029 #endif
    00030
    00031 #ifndef INTI_GDK_COLOR_H
    00032 #include <inti/gdk/color.h>
    00033 #endif
    00034
    00035 #ifndef INTI_GDK_TYPES_H
    00036 #include <inti/gdk/types.h>
    00037 #endif
    00038
    00039 #ifndef INTI_GTK_ENUMS_H
    00040 #include <inti/gtk/enums.h>
    00041 #endif
    00042
    00043 #ifndef __GTK_STYLE_H__
    00044 #include <gtk/gtkstyle.h>
    00045 #endif
    00046
    00047 namespace Inti {
    00048
    00049 namespace Gdk {
    00050 class GC;
    00051 class Pixbuf;
    00052 class Pixmap;
    00053 class Rectangle;
    00054 class Window;
    00055 }
    00056
    00057 namespace Pango {
    00058 class FontDescription;
    00059 class Layout;
    00060 }
    00061
    00062 namespace Gtk {
    00063
    00064 class IconSet;
    00065 class IconSource;
    00066 class StyleClass;
    00067 class Widget;
    00068
    00078
    00079 class Style : public G::Object
    00080 {
    00081         friend class G::Object;
    00082         friend class StyleClass;
    00083
    00084         Style(const Style&);
    00085         Style& operator=(const Style&);
    00086
    00087 protected:
    00090
    00091         explicit Style(GtkStyle *style, bool reference = true);
    00098
    00100
    00101 public:
    00104
    00105         virtual ~Style();
    00107
    00111
    00112         GtkStyle* gtk_style() const { return (GtkStyle*)instance; }
    00114
    00115         GtkStyleClass* gtk_style_class() const;
    00117
    00118         operator GtkStyle* () const;
    00120
    00121         Gdk::Color fg(StateType state_type) const;
    00125
    00126         Gdk::Color bg(StateType state_type) const;
    00130
    00131         Gdk::Color light(StateType state_type) const;
    00135
    00136         Gdk::Color dark(StateType state_type) const;
    00140
    00141         Gdk::Color mid(StateType state_type) const;
    00145
    00146         Gdk::Color text(StateType state_type) const;
    00150
    00151         Gdk::Color base(StateType state_type) const;
    00155
    00156         Gdk::Color text_aa(StateType state_type) const;
    00160
    00161         Gdk::Color black() const;
    00164
    00165         Gdk::Color white() const;
    00168
    00169         Pointer<Pango::FontDescription> font_desc() const;
    00171
    00172         Gdk::GC* black_gc() const;
    00174
    00175         Gdk::GC* white_gc() const;
    00177
    00178         Gdk::GC* fg_gc(StateType state_type) const;
    00182
    00183         Gdk::GC* bg_gc(StateType state_type) const;
    00187
    00188         Gdk::GC* light_gc(StateType state_type) const;
    00192
    00193         Gdk::GC* dark_gc(StateType state_type) const;
    00197
    00198         Gdk::GC* mid_gc(StateType state_type) const;
    00202
    00203         Gdk::GC* text_gc(StateType state_type) const;
    00207
    00208         Gdk::GC* base_gc(StateType state_type) const;
    00212
    00213         Gdk::GC* text_aa_gc(StateType state_type) const;
    00217
    00218         Gdk::Pixmap* bg_pixmap(StateType state_type) const;
    00222
    00226
    00227         Pointer<Style> copy() const;
    00229
    00230         void attach(const Gdk::Window& window);
    00248
    00249         void set_background(Gdk::Window& window, StateType state_type);
    00254
    00255         Pointer<IconSet> lookup_icon_set(const char *stock_id);
    00257
    00258         void apply_default_background
    00259         (
    00260                 Gdk::Window& window,
    00261                 bool set_bg,
    00262                 StateType state_type,
    00263                 int x,
    00264                 int y,
    00265                 int width,
    00266                 int height,
    00267                 const Gdk::Rectangle *area = 0
    00268         );
    00281
    00282         Pointer<Gdk::Pixbuf> render_icon
    00283         (
    00284                 const IconSource& source,
    00285                 TextDirection direction,
    00286                 StateType state,
    00287                 IconSize size,
    00288                 Widget *widget = 0,
    00289                 const char *detail = 0
    00290         );
    00302
    00303         void draw_hline
    00304         (
    00305                 Gdk::Window& window,
    00306                 StateType state_type,
    00307                 int x1,
    00308                 int x2,
    00309                 int y,
    00310                 const Gdk::Rectangle *area = 0,
    00311                 Widget *widget = 0,
    00312                 const char *detail = 0
    00313         );
    00323
    00324         void draw_vline
    00325         (
    00326                 Gdk::Window& window,
    00327                 StateType state_type,
    00328                 int y1,
    00329                 int y2,
    00330                 int x,
    00331                 const Gdk::Rectangle *area = 0,
    00332                 Widget *widget = 0,
    00333                 const char *detail = 0
    00334         );
    00344
    00345         void draw_shadow
    00346         (
    00347                 Gdk::Window& window,
    00348                 StateType state_type,
    00349                 ShadowType shadow_type,
    00350                 int x,
    00351                 int y,
    00352                 int width,
    00353                 int height,
    00354                 const Gdk::Rectangle *area = 0,
    00355                 Widget *widget = 0,
    00356                 const char *detail = 0
    00357         );
    00369
    00370         void draw_polygon
    00371         (
    00372                 Gdk::Window& window,
    00373                 StateType state_type,
    00374                 ShadowType shadow_type,
    00375                 const Gdk::Point *points,
    00376                 int npoints,
    00377                 bool fill,
    00378                 const Gdk::Rectangle *area = 0,
    00379                 Widget *widget = 0,
    00380                 const char *detail = 0
    00381         );
    00392
    00393         void draw_arrow
    00394         (
    00395                 Gdk::Window& window,
    00396                 StateType state_type,
    00397                 ShadowType shadow_type,
    00398                 ArrowType arrow_type,
    00399                 bool fill,
    00400                 int x,
    00401                 int y,
    00402                 int width,
    00403                 int height,
    00404                 const Gdk::Rectangle *area = 0,
    00405                 Widget *widget = 0,
    00406                 const char *detail = 0
    00407          );
    00422
    00423         void draw_diamond
    00424         (
    00425                 Gdk::Window& window,
    00426                 StateType state_type,
    00427                 ShadowType shadow_type,
    00428                 int x,
    00429                 int y,
    00430                 int width,
    00431                 int height,
    00432                 const Gdk::Rectangle *area = 0,
    00433                 Widget *widget = 0,
    00434                 const char *detail = 0
    00435          );
    00447
    00448         void draw_box
    00449         (
    00450                 Gdk::Window& window,
    00451                 StateType state_type,
    00452                 ShadowType shadow_type,
    00453                 int x,
    00454                 int y,
    00455                 int width,
    00456                 int height,
    00457                 const Gdk::Rectangle *area = 0,
    00458                 Widget *widget = 0,
    00459                 const char *detail = 0
    00460         );
    00472
    00473         void draw_flat_box
    00474         (
    00475                 Gdk::Window& window,
    00476                 StateType state_type,
    00477                 ShadowType shadow_type,
    00478                 int x,
    00479                 int y,
    00480                 int width,
    00481                 int height,
    00482                 const Gdk::Rectangle *area = 0,
    00483                 Widget *widget = 0,
    00484                 const char *detail = 0
    00485         );
    00497
    00498         void draw_check
    00499         (
    00500                 Gdk::Window& window,
    00501                 StateType state_type,
    00502                 ShadowType shadow_type,
    00503                 int x,
    00504                 int y,
    00505                 int width,
    00506                 int height,
    00507                 const Gdk::Rectangle *area = 0,
    00508                 Widget *widget = 0,
    00509                 const char *detail = 0
    00510         );
    00522
    00523         void draw_option
    00524         (
    00525                 Gdk::Window& window,
    00526                 StateType state_type,
    00527                 ShadowType shadow_type,
    00528                 int x,
    00529                 int y,
    00530                 int width,
    00531                 int height,
    00532                 const Gdk::Rectangle *area = 0,
    00533                 Widget *widget = 0,
    00534                 const char *detail = 0
    00535         );
    00547
    00548         void draw_tab
    00549         (
    00550                 Gdk::Window& window,
    00551                 StateType state_type,
    00552                 ShadowType shadow_type,
    00553                 int x,
    00554                 int y,
    00555                 int width,
    00556                 int height,
    00557                 const Gdk::Rectangle *area = 0,
    00558                 Widget *widget = 0,
    00559                 const char *detail = 0
    00560         );
    00573
    00574         void draw_shadow_gap
    00575         (
    00576                 Gdk::Window& window,
    00577                 StateType state_type,
    00578                 ShadowType shadow_type,
    00579                 int x,
    00580                 int y,
    00581                 int width,
    00582                 int height,
    00583                 PositionType gap_side,
    00584                 int gap_x,
    00585                 int gap_width,
    00586                 const Gdk::Rectangle *area = 0,
    00587                 Widget *widget = 0,
    00588                 const char *detail = 0
    00589         );
    00604
    00605         void draw_box_gap
    00606         (
    00607                 Gdk::Window& window,
    00608                 StateType state_type,
    00609                 ShadowType shadow_type,
    00610                 int x,
    00611                 int y,
    00612                 int width,
    00613                 int height,
    00614                 PositionType gap_side,
    00615                 int gap_x,
    00616                 int gap_width,
    00617                 const Gdk::Rectangle *area = 0,
    00618                 Widget *widget = 0,
    00619                 const char *detail = 0
    00620         );
    00635
    00636         void draw_extension
    00637         (
    00638                 Gdk::Window& window,
    00639                 StateType state_type,
    00640                 ShadowType shadow_type,
    00641                 int x,
    00642                 int y,
    00643                 int width,
    00644                 int height,
    00645                 PositionType gap_side,
    00646                 const Gdk::Rectangle *area = 0,
    00647                 Widget *widget = 0,
    00648                 const char *detail = 0
    00649         );
    00662
    00663         void draw_focus
    00664         (
    00665                 Gdk::Window& window,
    00666                 StateType state_type,
    00667                 int x,
    00668                 int y,
    00669                 int width,
    00670                 int height,
    00671                 const Gdk::Rectangle *area = 0,
    00672                 Widget *widget = 0,
    00673                 const char *detail = 0
    00674         );
    00685
    00686         void draw_slider
    00687         (
    00688                 Gdk::Window& window,
    00689                 StateType state_type,
    00690                 ShadowType shadow_type,
    00691                 int x,
    00692                 int y,
    00693                 int width,
    00694                 int height,
    00695                 Orientation orientation,
    00696                 const Gdk::Rectangle *area = 0,
    00697                 Widget *widget = 0,
    00698                 const char *detail = 0
    00699         );
    00712
    00713         void draw_handle
    00714         (
    00715                 Gdk::Window& window,
    00716                 StateType state_type,
    00717                 ShadowType shadow_type,
    00718                 int x,
    00719                 int y,
    00720                 int width,
    00721                 int height,
    00722                 Orientation orientation,
    00723                 const Gdk::Rectangle *area = 0,
    00724                 Widget *widget = 0,
    00725                 const char *detail = 0
    00726         );
    00739
    00740         void draw_expander
    00741         (
    00742                 Gdk::Window& window,
    00743                 StateType state_type,
    00744                 int x,
    00745                 int y,
    00746                 ExpanderStyle expander_style,
    00747                 const Gdk::Rectangle *area = 0,
    00748                 Widget *widget = 0,
    00749                 const char *detail = 0
    00750         );
    00760
    00761         void draw_layout
    00762         (
    00763                 Gdk::Window& window,
    00764                 StateType state_type,
    00765                 bool use_text,
    00766                 int x,
    00767                 int y,
    00768                 Pango::Layout& layout,
    00769                 const Gdk::Rectangle *area = 0,
    00770                 Widget *widget = 0,
    00771                 const char *detail = 0
    00772         );
    00783
    00784         void draw_resize_grip
    00785         (
    00786                 Gdk::Window& window,
    00787                 StateType state_type,
    00788                 Gdk::WindowEdge edge,
    00789                 int x,
    00790                 int y,
    00791                 int width,
    00792                 int height,
    00793                 const Gdk::Rectangle *area = 0,
    00794                 Widget *widget = 0,
    00795                 const char *detail = 0
    00796         );
    00808
    00810 };
    00811
    00812 } // namespace Gtk
    00813
    00814 } // namespace Inti
    00815
    00816 #endif // INTI_GTK_STYLE_H
    00817

Main Page - Footer