Transparency.h File Reference

#include <windows.h>
#include <windowsx.h>
#include "wgnuplib.h"
#include "resource.h"
#include "Messages.h"
#include "Warnings.h"
#include "Errors.h"
#include "version.h"
#include "win_mem_alloc.h"

Include dependency graph for Transparency.h:

This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Defines

#define _WIN32_WINNT   0x0500

Functions

BOOL EnableTransparencyMode (HWND hWnd)
BOOL DisableTransparencyMode (HWND hWnd)
BOOL IsEnableTransparencyMode (void)
void ScilabFxFadeOut (void)
int GetCurrentAlphaLevel (void)
void SetCurrentAlphaLevel (HWND hWnd, int Alpha)
BOOL IncreaseAlphaLevel (void)
BOOL DecreaseAlphaLevel (void)


Define Documentation

#define _WIN32_WINNT   0x0500

Definition at line 8 of file Transparency.h.


Function Documentation

BOOL DecreaseAlphaLevel ( void   ) 

Definition at line 101 of file Transparency.c.

00102 {
00103         BOOL bOK=FALSE;
00104         LPTW lptw=GetTextWinScilab();
00105         int Alpha=GetCurrentAlphaLevel();
00106 
00107         if (Alpha<0) Alpha=0;
00108         else
00109         {
00110                 SetCurrentAlphaLevel(lptw->hWndParent ,Alpha--);
00111                 SetCurrentAlphaLevel(lptw->hWndText ,Alpha--);
00112         }
00113         return bOK;
00114 }

BOOL DisableTransparencyMode ( HWND  hWnd  ) 

Definition at line 38 of file Transparency.c.

References CurrentAlphaLevel, FALSE, TransparencyON, and TRUE.

Referenced by IncreaseAlphaLevel().

00039 {
00040         BOOL bOK=FALSE;
00041 
00042         SetWindowLong(hWnd,     GWL_EXSTYLE,CS_HREDRAW | CS_VREDRAW);
00043         CurrentAlphaLevel=255;
00044         TransparencyON=FALSE;
00045         bOK=TRUE;
00046 
00047         return bOK;
00048 }

Here is the caller graph for this function:

BOOL EnableTransparencyMode ( HWND  hWnd  ) 

int GetCurrentAlphaLevel ( void   ) 

Definition at line 61 of file Transparency.c.

References CurrentAlphaLevel.

Referenced by DecreaseAlphaLevel(), IncreaseAlphaLevel(), and ScilabFxFadeOut().

00062 {
00063         return CurrentAlphaLevel;
00064 }

Here is the caller graph for this function:

BOOL IncreaseAlphaLevel ( void   ) 

Definition at line 75 of file Transparency.c.

00076 {
00077         BOOL bOK=FALSE;
00078         LPTW lptw=GetTextWinScilab();
00079         int Alpha=GetCurrentAlphaLevel();
00080 
00081         if (Alpha==255)
00082         {
00083                 DisableTransparencyMode(lptw->hWndParent);
00084                 DisableTransparencyMode(lptw->hWndText);
00085                 DragAcceptFiles (lptw->hWndParent, TRUE);
00086                 InvalidateRect(lptw->hWndParent,NULL,TRUE);
00087                 InvalidateRect(lptw->hWndText,NULL,TRUE);
00088         }
00089         else
00090         {
00091                 if (Alpha<255)
00092                 {
00093                         SetCurrentAlphaLevel(lptw->hWndParent ,Alpha++);
00094                         SetCurrentAlphaLevel(lptw->hWndText ,Alpha++);
00095                         if (Alpha>255) Alpha=255;
00096                 }
00097         }
00098         return bOK;
00099 }

BOOL IsEnableTransparencyMode ( void   ) 

Definition at line 24 of file Transparency.c.

00025 {
00026         return TransparencyON;
00027 }

void ScilabFxFadeOut ( void   ) 

Definition at line 50 of file Transparency.c.

00051 {
00052         LPTW lptw=GetTextWinScilab();
00053         int i=0;
00054         for (i=GetCurrentAlphaLevel();i>=0;i=i-16)
00055         {
00056                 SetCurrentAlphaLevel(lptw->hWndParent ,i);
00057                 SetCurrentAlphaLevel(lptw->hWndText ,i);
00058         }
00059 }

void SetCurrentAlphaLevel ( HWND  hWnd,
int  Alpha 
)

Definition at line 66 of file Transparency.c.

References COLORREF, CurrentAlphaLevel, LWA_ALPHA, and NULL.

Referenced by DecreaseAlphaLevel(), IncreaseAlphaLevel(), and ScilabFxFadeOut().

00067 {
00068         if ( (Alpha>=0) && (Alpha<=255) )
00069         {
00070                 SetLayeredWindowAttributes(hWnd, (COLORREF)NULL,CurrentAlphaLevel, LWA_ALPHA);
00071         }
00072         CurrentAlphaLevel=Alpha;
00073 }

Here is the caller graph for this function:


Generated on Sun Mar 4 15:58:15 2007 for Scilab [trunk] by  doxygen 1.5.1