Porovnávané verzie

Kľúč

  • Tento riadok sa pridal
  • Riadok je odstránený.
  • Formátovanie sa zmenilo.

%HI_RemapColorPal function


Function

The function remaps the color palette in HI to other palette. The change will be used in newly opened windows. In open windows, there are colors from the former palette until the windows want to change them. For instance, a change of color caused by a change of a value of D2000 object. The function does not work recursively, i.e. if Palette1 is remapped to Palette2 and Palette2 to Palette3, the colors required from Palette1 will be from Palette2, not from Palette3. 

Declaration


Blok kódu
languagecpp
themeConfluence
%HI_RemapColorPal(
   HOBJ in colorPalette1,
   HOBJ in toColorPalette2
 )


Parameters


colorPalette1 The color palette that will be remapped.
toColorPalette2 The color palette to which other palette will be remapped.


Note 1Description

Remapping is cancelled if, colorPalette1 = toColorPalette2

It is useful to use the function if we need to change the color appearance of the application (skinnability).

The color palette is remapped by calling the% HI_RemapColorPal function.

The recommended use is to implement the application (or part of it) through a single color palette (for example, an application-defined FP_NORMAL palette). Subsequently, during run (throughout the HI process), the use of this palette can be changed (for example, the application-defined FP_BLUE palette) to change colors.

%HI_RemapColorPal(FP_NORMAL\HBJ, FP_BLUE\HBJ)

If the remapping effect (applicable to the FP_NORMAL palette) needs to be canceled, the second function parameter must match the first one.

%HI_RemapColorPal(FP_NORMAL\HBJ, FP_NORMAL\HBJ)

The function allows you to remap or use a system color palette when mapped, if the value of parameter 0 is at the appropriate position.

%HI_RemapColorPal(FP_NORMAL\HBJ, 0)
%HI_RemapColorPal(0, FP_NORMAL\HBJ)

Note

The function does not work recursively, i.e. if Palette1 is remapped to Palette2 and Palette2 to Palette3, the colors required from Palette1 will be from Palette2, not from Palette3. 

Note 2

The system palette is available as  HOBJ(0)