1 ; +----------+-----------+
2 ; | PureHTML | Ryan Touk |
3 ; +----------+-----------+
4 ; | 10.16.2012 @ Creation (PureBasic 4.61)
5 ; | .17. . Added CSS classes, improved HTML generation
6 ; | .18. . Reduced where possible
7 ; | .31. . Added style frame settings
8 ; | 11.02. . Used "white-space:pre;" to reduce " " to " "
9 ; | .03. . Fixed IncludeBinary and IncludePath links (no .htm), blank lines
10 ; | 12.27. . Added "Line Numbers" style with separate background color,
11 ; | fixed trailing styled whitespace problem, keyboard shortcuts
12 ; | 1.02.2013 . Updated code to be compatible with PureBasic 5.10 Beta 2
13 ; | .18. . Preferences now auto-load correctly, inputs fields are validated
14 ; | .19. . Added generate, close, and about buttons, open-when-done option
15 ; | .20. . Added settings import/export, added ColorCanvas popup menu
16 ; | 2.12. @ Version 1.00 release (PureBasic 5.10 Beta 8)
17
18
19 ;-
20 ;- Constants
21
22 #PH_Title = "PureHTML"
23 #PH_Author = "Ryan Touk"
24 #PH_Version = 100
25 #PH_Website = "www.grudlux.com"
26
27 ;- Compile Settings
28 #PH_CompactSpaces = #True
29
30 ;- Includes / Procedures
31
32 XIncludeFile "_shared.pbi"
33 XIncludeFile "_windows.pbi"
34 XIncludeFile "_styles.pbi"
35 XIncludeFile "_highlight.pbi"
36
37
38
39
40
41
42 ;- Initializations
43
44 If (Not CreateMainWindow())
45 Error("Main window could not be created!")
46 EndIf
47
48 If (Not FindLibrary())
49 Error("Syntax Highlighting library not found!")
50 EndIf
51
52 LoadIDEPrefs()
53 UpdateMainWindow()
54 HideWindow(#PHW_Main, #False)
55 SetActiveWindow(#PHW_Main)
56 SetActiveGadget(#PHG_InFile)
57
58
59
60
61
62
63
64 ;- Main Loop
65
66 Repeat
67 Event = WaitWindowEvent()
68
69 Select (EventWindow())
70 Case (#PHW_Main)
71 MainWindowEvent(Event, EventGadget(), EventType(), EventMenu())
72 EndSelect
73
74 Until (ExitFlag)
75 Shutdown(0)
76
77 ;-
78 ; EOF