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

📄 linestyle.class

📁 是一个经济学管理应用软件 很难找的 但是经济学学生又必须用到
💻 CLASS
字号:
/*				linestyle				*/
*! version 1.0.3  12nov2003

version 8

class {

    instance:
	width     = .linewidth.new,   /* style(medium) */
	color 	  = .color.new,       type(line) /* style(white) */
	pattern   = .linepattern.new, /* style(solid) */

}, inherit(style)


/* -------------------------------------------------------------------------*/
/* see .set								    */

program define new

	syntax [ , Style(string) * ]
	if "`style'" != "" {
		.setstyle, style(scheme)
	}
	
	.Super.new , `.set `0''
end

program define set

	syntax [, Color(string) Pattern(passthru) Width(real `.width.val') * ]

	if "`color'" != "" {
		.color.setopts , `color'
	}

	if `width' != `.width.val' {
		.width.val = `width'
	}

	if "`pattern'" != "" { 
		.pattern.set , `pattern' 
	}

	class exit `"`options'"'

end


/* -------------------------------------------------------------------------*/
/*
	Usage:  .patterned_line 
*/
program patterned_line

	class exit = ! ("`.pattern.snm'"  == "blank" | 	///
			"`.pattern.snm'"  == "solid" )
end


/* -------------------------------------------------------------------------*/
/*
	Usage:  .blank_line 
*/
program blank_line

	class exit = ("`.snm'" == "none" | "`.pattern.snm'" == "blank" | ///
		      "`.width.snm'" == "none" | "`.color.snm'" == "none")
end


/* -------------------------------------------------------------------------*/
/* 
	Set this line style to the GDI
*/

program define setgdi

	.color.setgdi , line
	gdi gm_linewidth = `.width.gmval'
	if ("`.color.stylename'" != "none")  .pattern.setgdi
end


/* -------------------------------------------------------------------------*/
/* 
	Set this line style to the GDI and reset the pen
*/

program define setgdifull

	.setgdi
	gdi penchange
end



/* -------------------------------------------------------------------------*/
/* 
	Set this line style to the GDI, allowing over-ride of color, width, or
	pattern.

	This is a low level call assumes the color, pattern, and/or width are
	values to be directly set to the GDI, does NOT accept stylenames or
	use schemes.

	"Cheats" by assuming it knows how to set colors and patterns.
*/

program define setgdifullspecial

	syntax [, Color(string) Pattern(string asis) Width(string) ]

	.setgdi

	if (`"`color'"' != `""')    gdi linergb = `color'
	if (`"`width'"' != `""')    gdi gm_linewidth = `width'
	if (`"`pattern'"' != `""') {
		if (`"`pattern'"' == `""""') gdi linedash = 
		else			     gdi linedash = `pattern'
	}

	gdi penchange
end

⌨️ 快捷键说明

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