New Sections.nsh
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2160 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
c59f187c74
commit
858c86cbdc
2 changed files with 54 additions and 8 deletions
46
Include/Sections.nsh
Normal file
46
Include/Sections.nsh
Normal file
|
@ -0,0 +1,46 @@
|
|||
; Some sections defines
|
||||
|
||||
; Include in your script using:
|
||||
; !include "Sections.nsh"
|
||||
|
||||
!ifndef SECTIONS_NSH_INCLUDED
|
||||
|
||||
!define SECTIONS_NSH_INCLUDED
|
||||
|
||||
!define HWND_BROADCAST 0xFFFF
|
||||
|
||||
!define SF_SELECTED 1
|
||||
!define SF_SUBSEC 2
|
||||
!define SF_SUBSECEND 4
|
||||
!define SF_BOLD 8
|
||||
!define SF_RO 16
|
||||
!define SF_EXPAND 32
|
||||
|
||||
!define SECTION_OFF 0xFFFFFFFE
|
||||
|
||||
!macro SelectSection SECTION
|
||||
Push $0
|
||||
SectionGetFlags "${SECTION}" $0
|
||||
IntOp $0 $0 & ${SF_SELECTED}
|
||||
SectionSetFlags "${SECTION}" $0
|
||||
Pop $0
|
||||
!macroend
|
||||
|
||||
!macro UnselectSection SECTION
|
||||
Push $0
|
||||
SectionGetFlags "${SECTION}" $0
|
||||
IntOp $0 $0 & ${SECTION_OFF}
|
||||
SectionSetFlags "${SECTION}" $0
|
||||
Pop $0
|
||||
!macroend
|
||||
|
||||
# if section selected, will unselect, if unselected, will select
|
||||
!macro ReverseSection SECTION
|
||||
Push $0
|
||||
SectionGetFlags "${SECTION}" $0
|
||||
IntOp $0 $0 ^ ${SF_SELECTED}
|
||||
SectionSetFlags "${SECTION}" $0
|
||||
Pop $0
|
||||
!macroend
|
||||
|
||||
!endif
|
Loading…
Add table
Add a link
Reference in a new issue