1 /* 2 * This file is part of gtkD. 3 * 4 * gtkD is free software; you can redistribute it and/or modify 5 * it under the terms of the GNU Lesser General Public License 6 * as published by the Free Software Foundation; either version 3 7 * of the License, or (at your option) any later version, with 8 * some exceptions, please read the COPYING file. 9 * 10 * gtkD is distributed in the hope that it will be useful, 11 * but WITHOUT ANY WARRANTY; without even the implied warranty of 12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 13 * GNU Lesser General Public License for more details. 14 * 15 * You should have received a copy of the GNU Lesser General Public License 16 * along with gtkD; if not, write to the Free Software 17 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110, USA 18 */ 19 20 // generated automatically - do not change 21 // find conversion definition on APILookup.txt 22 // implement new conversion functionalities on the wrap.utils pakage 23 24 /* 25 * Conversion parameters: 26 * inFile = GtkCellRendererProgress.html 27 * outPack = gtk 28 * outFile = CellRendererProgress 29 * strct = GtkCellRendererProgress 30 * realStrct= 31 * ctorStrct=GtkCellRenderer 32 * clss = CellRendererProgress 33 * interf = 34 * class Code: No 35 * interface Code: No 36 * template for: 37 * extend = 38 * implements: 39 * prefixes: 40 * - gtk_cell_renderer_progress_ 41 * - gtk_ 42 * omit structs: 43 * omit prefixes: 44 * omit code: 45 * omit signals: 46 * imports: 47 * - gtk.CellRenderer 48 * structWrap: 49 * - GtkCellRenderer* -> CellRenderer 50 * module aliases: 51 * local aliases: 52 * overrides: 53 */ 54 55 module gtk.CellRendererProgress; 56 57 public import gtkc.gtktypes; 58 59 private import gtkc.gtk; 60 private import glib.ConstructionException; 61 private import gobject.ObjectG; 62 63 64 private import gtk.CellRenderer; 65 66 67 68 private import gtk.CellRenderer; 69 70 /** 71 * Description 72 * GtkCellRendererProgress renders a numeric value as a progress par in a cell. 73 * Additionally, it can display a text on top of the progress bar. 74 * The GtkCellRendererProgress cell renderer was added in GTK+ 2.6. 75 */ 76 public class CellRendererProgress : CellRenderer 77 { 78 79 /** the main Gtk struct */ 80 protected GtkCellRendererProgress* gtkCellRendererProgress; 81 82 83 public GtkCellRendererProgress* getCellRendererProgressStruct() 84 { 85 return gtkCellRendererProgress; 86 } 87 88 89 /** the main Gtk struct as a void* */ 90 protected override void* getStruct() 91 { 92 return cast(void*)gtkCellRendererProgress; 93 } 94 95 /** 96 * Sets our main struct and passes it to the parent class 97 */ 98 public this (GtkCellRendererProgress* gtkCellRendererProgress) 99 { 100 super(cast(GtkCellRenderer*)gtkCellRendererProgress); 101 this.gtkCellRendererProgress = gtkCellRendererProgress; 102 } 103 104 protected override void setStruct(GObject* obj) 105 { 106 super.setStruct(obj); 107 gtkCellRendererProgress = cast(GtkCellRendererProgress*)obj; 108 } 109 110 /** 111 */ 112 113 /** 114 * Creates a new GtkCellRendererProgress. 115 * Since 2.6 116 * Throws: ConstructionException GTK+ fails to create the object. 117 */ 118 public this () 119 { 120 // GtkCellRenderer * gtk_cell_renderer_progress_new (void); 121 auto p = gtk_cell_renderer_progress_new(); 122 if(p is null) 123 { 124 throw new ConstructionException("null returned by gtk_cell_renderer_progress_new()"); 125 } 126 this(cast(GtkCellRendererProgress*) p); 127 } 128 }