⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 image-list.zc

📁 实现树形结构
💻 ZC
字号:
//[c]image list//[c]//[of]:license//[c]    Code Browser - a folding text editor for programmers//[c]    Copyright (C) 2005-07 Marc Kerbiquet//[c]//[c]    This program is free software; you can redistribute it and/or modify//[c]    it under the terms of the GNU General Public License as published by//[c]    the Free Software Foundation; either version 2 of the License, or//[c]    (at your option) any later version.//[c]//[c]    This program is distributed in the hope that it will be useful,//[c]    but WITHOUT ANY WARRANTY; without even the implied warranty of//[c]    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the//[c]    GNU General Public License for more details.//[c]//[c]    You should have received a copy of the GNU General Public License//[c]    along with this program; if not, write to the Free Software//[c]    Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA//[cf]//[of]:importsimport "base/types"import "base/memory-allocator"import "collection/vector"//[c]import "graphics/geometry"import "graphics/graphics"import "user/box"//[c]import "glib/glib"import "glib/glib-object"import "gdk/gdk"import "gtk/gtk"import "gdk-pixbuf/gdk-pixbuf"import "private/sys-command"//[cf]//[of]:structures//[c]public struct image list	 images: local vectorend//[c]//[cf]//[c]//[of]:initialize - release//[of]:initialize//[c]public func initialize (m: image list, n: int, w: int, h: int)	initialize (images (m), n)end//[cf]//[of]:release//[c]public func release (m: image list)	each (images (m)) ? i		equ pixbuf = i : GdkPixbuf		g_object_unref (pixbuf)	end	release (images (m))end//[cf]//[cf]//[of]:adding - removing//[of]:add icon (id)//[c]private [name="c"] import def gtk_resources : [1] []char//[c]public func add icon (m: image list, icon: int)	def index = icon - 101	def resource = gtk_resources [index] : [][] gchar		def pixbuf = gdk_pixbuf_new_from_xpm_data (resource)	add (images (m), pixbuf)end//[cf]//[cf]

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -