$INCLUDE "QCoolBarXP87.inc"
$RESOURCE Snew_bmp AS "New2.bmp"
$RESOURCE Sopen_bmp AS "Open.bmp"
$RESOURCE Ssave_bmp AS "Save.bmp"
$RESOURCE TBarBtn1_BMP AS "TBarBtn1I.bmp"
DECLARE SUB Form_Click (Sender AS QFORM)
DECLARE SUB Form_Resize (Sender AS QFORM)
DECLARE SUB CoolBar_MoveIn (X AS INTEGER, Y AS INTEGER, Shift AS INTEGER, ItemIndex AS INTEGER, Sender AS QCoolBarXP)
DECLARE SUB CoolBar_MoveOut (X AS INTEGER, Y AS INTEGER, Shift AS INTEGER, Sender AS QCoolBarXP)
DECLARE SUB CoolBar_Change (ItemIndex AS INTEGER, Sender AS QCoolBarXP)
DIM isXP AS INTEGER
isXP = isXP_QTBtn
DIM openItem AS QMENUITEM
openItem.CAPTION = "... <vide>"
DIM dummyItem AS QMENUITEM
dummyItem.CAPTION = "... <vide>"
DIM Edit AS QEDIT
DIM ComboBox AS QCOMBOBOX
CREATE Form AS QFORM
CAPTION = "CoolBarXP"
Width = 360
Height = 240
Center
COLOR = IIF(isXP_QTBtn, -2147483638, -2147483636)
CREATE CoolBar3 AS QCoolBarXP
Align = True
Width = 354
Height = 40
ItemsWidth = 40
AddItems ("...", "-", "...", "-", "...", "-")
imglA.Height = 32
imglA.Width = 32
imglA.addbmphandle TBarBtn1_BMP, 0
imglA.addbmphandle TBarBtn1_BMP, 0
imglA.addbmphandle TBarBtn1_BMP, 0
CAPTION = "CoolBar3"
HideCaption = False
ShowGrip = True
AddEditCtrl (Edit)
RePaint
OnMouseEnter = CoolBar_MoveIn
OnMouseLeave = CoolBar_MoveOut
OnChange = CoolBar_Change
END CREATE
CREATE CoolBar2 AS QCoolBarXP
Align = True
Width = 354
AddItems ("...", "...", "...", "-", "...", "...", "-")
imglA.Height = 16
imglA.Width = 16
imglA.addbmphandle Snew_bmp, 0
imglA.addbmphandle Sopen_bmp, 0
imglA.addbmphandle Ssave_bmp, clPurple
imglA.addbmphandle Snew_bmp, 0
imglA.addbmphandle Sopen_bmp, 0
CAPTION = "CoolBar2"
HideCaption = False
ShowGrip = True
AddComboBoxCtrl (ComboBox)
RePaint
OnMouseEnter = CoolBar_MoveIn
OnMouseLeave = CoolBar_MoveOut
OnChange = CoolBar_Change
END CREATE
CREATE CoolBar1 AS QCoolBarXP
Align = True
Width = 354
ShowBtnsCaption (True, 0, 1)
AddItems ("Nouveau", "Ouvrir", "Enregistrer", "-", "...", "...", "...", "-", "...", "...", "...")
imglA.Height = 16
imglA.Width = 16
imglA.addbmphandle Snew_bmp, 0
imglA.addbmphandle Sopen_bmp, 0
imglA.addbmphandle Ssave_bmp, clPurple
imglA.addbmphandle Snew_bmp, 0
imglA.addbmphandle Sopen_bmp, 0
imglA.addbmphandle Ssave_bmp, clPurple
imglA.addbmphandle Snew_bmp, 0
imglA.addbmphandle Sopen_bmp, 0
imglA.addbmphandle Ssave_bmp, clPurple
CAPTION = "CoolBar1"
HideCaption = False
ShowGrip = True
mnuPopup(0).AddItems(openItem)
mnuPopup(2).AddItems(dummyItem)
OnMouseEnter = CoolBar_MoveIn
OnMouseLeave = CoolBar_MoveOut
OnChange = CoolBar_Change
END CREATE
CREATE CoolBar4 AS QCoolBarXP
Align = 3
Left = 6
Top = 8
Width = 26
BevelWidth = False
ItemsWidth = 24
Orientation = True
AddItems ("...", "-", "...", "-", "...", "-")
imglA.Height = 16
imglA.Width = 16
imglA.addbmphandle Sopen_bmp, 0
imglA.addbmphandle Ssave_bmp, clPurple
imglA.addbmphandle Snew_bmp, 0
CAPTION = ""
ShowGrip = True
RePaint
OnMouseEnter = CoolBar_MoveIn
OnMouseLeave = CoolBar_MoveOut
OnChange = CoolBar_Change
END CREATE
CREATE StatusBar1 AS QSTATUSBAR
AddPanels ("")
END CREATE
OnClick = Form_Click
OnResize = Form_Resize
END CREATE
SUB Combo_Change(Sender AS QCOMBOBOX)
IF isXP THEN
isXP_QTBtn = Sender.ItemIndex
CoolBar1.RePaint
CoolBar2.RePaint
CoolBar3.RePaint
CoolBar4.RePaint
END IF
END SUB
ComboBox.AddItems ("Plat", "Style XP (XP Seulement)")
ComboBox.Style = 2
ComboBox.OnChange = Combo_Change
ComboBox.ItemIndex = IIF(isXP, True, False)
Form.SHOWMODAL
SUB CoolBar_MoveIn
StatusBar1.Panel(0).CAPTION = "À l'intérieur, " +" Button " +STR$(ItemIndex) +" " +STR$(X)
END SUB
SUB CoolBar_MoveOut
StatusBar1.Panel(0).CAPTION = "Dehors..."
END SUB
SUB CoolBar_Change
StatusBar1.Panel(0).CAPTION = "Bouton " +STR$(ItemIndex) +" cliqué..."
IF Sender.CAPTION = "CoolBar2" THEN _
IF ItemIndex = 4 OR ItemIndex = 5 THEN _
ComboBox.ItemIndex = IIF(ComboBox.ItemIndex, False, True)
Combo_Change(ComboBox)
END SUB
|
|