
- Added SF_PSELECTED for partially selected sub-sections - SF_EXPAND now refreshes the components tree - Fixed problems with sub-sections with RO sections as children - (-1) sent to .onMouseOverSection when mouse over nothing - RO sections can now be in InstTypes too (default to old behavior) - Optimized code git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2436 212acab6-be3b-0410-9dea-997c60f758d6
45 lines
No EOL
885 B
NSIS
45 lines
No EOL
885 B
NSIS
; Some sections defines
|
|
|
|
; Include in your script using:
|
|
; !include "Sections.nsh"
|
|
|
|
!ifndef SECTIONS_NSH_INCLUDED
|
|
|
|
!define SECTIONS_NSH_INCLUDED
|
|
|
|
!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 SF_PSELECTED 64
|
|
|
|
!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 |