59 lines
6.6 KiB
Plaintext
59 lines
6.6 KiB
Plaintext
{\rtf1\ansi\ansicpg1252\uc1\deff0\stshfdbch0\stshfloch0\stshfhich0\stshfbi0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman;}{\f37\froman\fcharset238\fprq2 Times New Roman CE;}
|
|
{\f38\froman\fcharset204\fprq2 Times New Roman Cyr;}{\f40\froman\fcharset161\fprq2 Times New Roman Greek;}{\f41\froman\fcharset162\fprq2 Times New Roman Tur;}{\f42\froman\fcharset177\fprq2 Times New Roman (Hebrew);}
|
|
{\f43\froman\fcharset178\fprq2 Times New Roman (Arabic);}{\f44\froman\fcharset186\fprq2 Times New Roman Baltic;}{\f45\froman\fcharset163\fprq2 Times New Roman (Vietnamese);}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;
|
|
\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;
|
|
\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 \snext0 Normal;}{\*\cs10 \additive \ssemihidden
|
|
Default Paragraph Font;}{\*\ts11\tsrowd\trftsWidthB3\trpaddl108\trpaddr108\trpaddfl3\trpaddft3\trpaddfb3\trpaddfr3\trcbpat1\trcfpat1\tscellwidthfts0\tsvertalt\tsbrdrt\tsbrdrl\tsbrdrb\tsbrdrr\tsbrdrdgl\tsbrdrdgr\tsbrdrh\tsbrdrv
|
|
\ql \li0\ri0\widctlpar\aspalpha\aspnum\faauto\adjustright\rin0\lin0\itap0 \fs20\lang1024\langfe1024\cgrid\langnp1024\langfenp1024 \snext11 \ssemihidden Normal Table;}}{\*\latentstyles\lsdstimax156\lsdlockeddef0}{\*\rsidtbl \rsid2901855}{\*\generator Micro
|
|
soft Word 11.0.5604;}{\info{\author TvmServer}{\operator TvmServer}{\creatim\yr2005\mo1\dy17\hr17\min17}{\revtim\yr2005\mo1\dy17\hr17\min17}{\version2}{\edmins0}{\nofpages2}{\nofwords371}{\nofchars2118}{\*\company Dundas India}{\nofcharsws2485}
|
|
{\vern24689}}\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale116\viewzk2\nolnhtadjtbl\rsidroot2901855
|
|
\fet0\sectd \linex0\sectdefaultcl\sftnbj {\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang {\pntxta .}}{\*\pnseclvl4
|
|
\pnlcltr\pnstart1\pnindent720\pnhang {\pntxta )}}{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}
|
|
{\pntxta )}}{\*\pnseclvl8\pnlcltr\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang {\pntxtb (}{\pntxta )}}\pard\plain \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0
|
|
\fs24\lang1033\langfe1033\cgrid\langnp1033\langfenp1033 {\b\fs48\cf2\insrsid2901855 COXRoundedButton}{\b\fs48\insrsid2901855
|
|
\par }{\b\fs16\insrsid2901855 Copyright \'a9}{\b\fs16\insrsid2901855 The Code Project 1997 - 2005}{\b\fs16\insrsid2901855 , All Rights Reserved
|
|
\par }{\insrsid2901855
|
|
\par COXRoundedButton is COXBitmapButton derived class that makes use of the
|
|
\par
|
|
\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid2901855 DrawRoundedButton()
|
|
\par }{\insrsid2901855
|
|
\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid2901855 function found in }{\ul\cf2\insrsid2901855 COXGraphics}{\insrsid2901855
|
|
class. This function allows us to draw 3D rounded rectangles. We use it in order to draw the button's background.
|
|
\par
|
|
\par As long as COXRoundedButton is derived from COXBitmapButton class, all functionality found in COXBitmapButton class applied to COXRoundedButton
|
|
\par as well (custom text font and color, images, including 256> colors, tooltips and much more. Refer to the documentation on COXBitmapButton class for details).
|
|
\par
|
|
\par Actually, COXRoundedButton class handles only the process of drawing of the background. You
|
|
can specify the base color that should be used in order to fill the button rectangle and other settings that influence the appearance of the button using the following functions:
|
|
\par
|
|
\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid2901855 void SetButtonColor();
|
|
\par void SetLightColor();
|
|
\par void SetSphereExternalRadius();
|
|
\par void SetSphereInternalRadius();
|
|
\par void SetLightIntensityCoef();
|
|
\par void SetThetta();
|
|
\par void SetPhi();
|
|
\par void SetPhong();
|
|
\par void SetMirrorCoef();
|
|
\par void SetDiffuseCoef();
|
|
\par void SetAmbientCoef();
|
|
\par }{\insrsid2901855
|
|
\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid2901855 No doubt, most of this function wouldn't tell you anything about the way they change the appearance of the button's background. If you would like to
|
|
\par understand the meaning of all settings you might refer to the following book:
|
|
\par
|
|
\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\b\insrsid2901855 "Computer Graphics, principle and practice" by James D. Foley, Andries van Dam, Steven K. Feiner, John F. Hughes
|
|
\par Addison-Wesley publishing company. ISBN 0-201-84840-6. Chapter 16 "Illumination and Shading".
|
|
\par
|
|
\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid2901855 Most people wouldn't care about it so we came up with a set of default values that would produce pretty good results for most colors. It means, that in order
|
|
\par to use the class you only have to specify the button color using the following function:
|
|
\par
|
|
\par }\pard \ql \li360\ri360\nowidctlpar\faauto\rin360\lin360\itap0 {\ul\cf2\insrsid2901855 void SetButtonColor()
|
|
\par }{\insrsid2901855
|
|
\par }\pard \ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 {\insrsid2901855 Other than that you should treat COXRoundedButton as COXBitmapButton object.
|
|
\par
|
|
\par Although we have to note that if you are going to use too dark or too light colors you might would like to use different settings. In order to simplify the
|
|
\par process of finding of set of appropriate values we provide "}{\b\insrsid2901855 Customize Rounded Button}{\insrsid2901855 " page in our }{\b\insrsid2901855 RoundedButton}{\insrsid2901855 sample that can be found in the
|
|
\par }{\b\insrsid2901855 .\\Samples\\gui\\RoundedButton}{\insrsid2901855 subdirectory of your Ultimate Toolbox directory. On this page you can easily apply different combination of all settings.
|
|
\par This sample also demonstrate COXRoundedButton samples (refer to "}{\b\insrsid2901855 Rounded Button Samples}{\insrsid2901855 " page).
|
|
\par }{\fs20\insrsid2901855
|
|
\par }} |