Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Enumeration
- #largeIcon
- #smallIcon
- #list
- #report
- EndEnumeration
- ; вот тебе кстати простейшее рисование картинок
- Procedure createButtons()
- CreateImage(#largeIcon,16,16)
- StartDrawing(ImageOutput(#largeIcon))
- Box(0,0,16,16,$eeeeee)
- Box(4,4,8,8,$990000)
- StopDrawing()
- CreateImage(#smallIcon,16,16)
- StartDrawing(ImageOutput(#smallIcon))
- Box(0,0,16,16,$eeeeee)
- Box(3,3,4,4,$990000)
- Box(9,3,4,4,$990000)
- Box(3,9,4,4,$990000)
- Box(9,9,4,4,$990000)
- StopDrawing()
- CreateImage(#list,16,16)
- StartDrawing(ImageOutput(#list))
- Box(0,0,16,16,$eeeeee)
- Box(3,3,10,4,$990000)
- Box(3,9,10,4,$990000)
- StopDrawing()
- CreateImage(#report,16,16)
- StartDrawing(ImageOutput(#report))
- Box(0,0,16,16,$eeeeee)
- Box(3,3,4,10,$990000)
- Box(9,3,4,10,$990000)
- StopDrawing()
- EndProcedure
- Procedure toggleButton(button.l)
- SetToolBarButtonState(0,#largeIcon,#False)
- SetToolBarButtonState(0,#smallIcon,#False)
- SetToolBarButtonState(0,#list,#False)
- SetToolBarButtonState(0,#report,#False)
- SetToolBarButtonState(0,button,#True)
- EndProcedure
- OpenWindow(0,200,200,500,300,"Открывалка файлов",#PB_Window_SystemMenu)
- SetWindowColor(0,$eeeeee)
- createButtons()
- CreateToolBar(0,WindowID(0))
- ToolBarImageButton(#largeIcon,ImageID(#largeIcon),#PB_ToolBar_Toggle)
- ToolBarImageButton(#smallIcon,ImageID(#smallIcon),#PB_ToolBar_Toggle)
- ToolBarImageButton(#list,ImageID(#list),#PB_ToolBar_Toggle)
- ToolBarImageButton(#report,ImageID(#report),#PB_ToolBar_Toggle)
- ToolBarToolTip(0,#largeIcon,"Large icon")
- ToolBarToolTip(0,#smallIcon,"Small icon")
- ToolBarToolTip(0,#list,"List")
- ToolBarToolTip(0,#report,"Report")
- folders = ExplorerListGadget(#PB_Any,0,ToolBarHeight(0),500,300-ToolBarHeight(0),dir$)
- SetGadgetAttribute(folders,#PB_Explorer_DisplayMode,#PB_Explorer_LargeIcon)
- toggleButton(#largeIcon)
- Repeat
- event = WaitWindowEvent()
- If event = #PB_Event_Menu
- Select EventMenu()
- Case #largeIcon
- value = #PB_Explorer_LargeIcon
- Case #smallIcon
- value = #PB_Explorer_SmallIcon
- Case #list
- value = #PB_Explorer_List
- Case #report
- value = #PB_Explorer_Report
- EndSelect
- SetGadgetAttribute(folders,#PB_Explorer_DisplayMode,value)
- toggleButton(EventMenu())
- EndIf
- Until event = #PB_Event_CloseWindow
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement