Page 1 of 2

[Module] ViewerEx.pbi (all OS)

Posted: Fri Apr 26, 2019 3:41 pm
by Thorsten1867
ViewerEx - Module (all OS / DPI / 64Bit)

A gadget to display content, e.g. about info, licenses, hints, help, etc.
  • directly add content or load previously created content
  • texts with WordWrap or automatic hyphenation
    (left-, right-justified, centered, justification)
  • lists, URLs & internal links
  • headings with automatic numbering
  • images
Image

Code: Select all

;  ----- Commands -----

;  ViewerEx::ClearContent()       - clear gadget content
;  ViewerEx::EventValue()         - return string value for the event (e.g. URL)
;  ViewerEx::Gadget()             - new gadget
;  ViewerEx::Load()               - load contents for the gadget from a file
;  ViewerEx::SetAutoResizeFlags() - automatically adjust gadget to window size.
;  ViewerEx::SetContent()         - select or change content using its label
;  ViewerEx::SetHeadingOffset()   - offset for numbering headings

;  ----- #Enable_AddViewerContent & #Enable_CreateViewerContent -----

;  ViewerEx::UseFont()    - specify the character set to be used.
;  ViewerEx::UseImage()   - specify images to be used
;  ViewerEx::UsePattern() - set hyphenation patterns to be used

;  ----- #Enable_AddViewerContent (add content directly) -----
;  ViewerEx::AddHeading()      - insert numbered headline into gadget
;  ViewerEx::AddImage()        - insert image into gadget
;  ViewerEx::AddLink()         - insert internal link into gadget
;  ViewerEx::AddListing()      - insert a listing with bullets
;  ViewerEx::AddSpacing()      - insert space between the items
;  ViewerEx::AddText()         - insert text into gadget
;  ViewerEx::AddURL()          - insert URL into gadget
;  ViewerEx::DefineHeading()   - define the appearance of headings
;  ViewerEx::DefineStyle()     - define the appearance of texts
;  ViewerEx::DisableReDraw()   - temporarily disable content redrawing
;  ViewerEx::Save()            - save the current content of the gadget with all required resources
;  ViewerEx::SetHyphenation()  - activate hyphenation for the corresponding language (pattern).
;  ViewerEx::SetMargin()       - define page margins

;  ----- #Enable_CreateViewerContent -----

;  ViewerEx::Create()            - create a new page with content under this label.
;  ViewerEx::Close()             - close the page with the corresponding label.
;  ViewerEx::CopyContent()       - copy generated content into a ViewerEx - Gadget.
;  ViewerEx::Export()            - export generated pages with content and save them with all resources in one file.
;  ViewerEx::Heading()           - add a numbered heading.
;  ViewerEx::HeadingDefinition() - defining the appearance of headings.
;  ViewerEx::Hyphenation()       - activate hyphenation for the corresponding language (pattern).
;  ViewerEx::Image()             - add a image.
;  ViewerEx::Link()              - add a internal link.
;  ViewerEx::Listing()           - add a listing with bullets
;  ViewerEx::Margin()            - define page margins.
;  ViewerEx::Spacing()           - add space between items.
;  ViewerEx::StyleDefinition()   - define the appearance of texts.
;  ViewerEx::Text()              - add text.
;  ViewerEx::URL()               - add a URL.
Download: ViewerEx.pbi

Re: [Module] ViewerEx.pbi (all OS)

Posted: Fri Apr 26, 2019 3:46 pm
by RSBasic
Image

Re: [Module] ViewerEx.pbi (all OS)

Posted: Sat Apr 27, 2019 9:49 pm
by Andre
Cool idea, thanks! :D

Small bug: If I resized the demo to full window height, the buttons "jump" from buttom of the window "into" the "viewer area".

Re: [Module] ViewerEx.pbi (all OS)

Posted: Sat Apr 27, 2019 11:43 pm
by StarBootics
Don't forget about the Button height on GTK3 (Ubuntu) is 34 pixels no matter what the size you set the button height.

On windows resize the button are not re-localized at all, a minor bug to fix.

Best regards
StarBootics

Re: [Module] ViewerEx.pbi (all OS)

Posted: Sun Apr 28, 2019 10:44 am
by Thorsten1867
Andre wrote:Cool idea, thanks! :D

Small bug: If I resized the demo to full window height, the buttons "jump" from buttom of the window "into" the "viewer area".
The buttons are only part of the example and not of the module.
With 'ResizeExModule.pbi' you can solve the problem.

Re: [Module] ViewerEx.pbi (all OS)

Posted: Wed Dec 18, 2019 5:38 pm
by Thorsten1867
New: 'ContentCreator.exe'

This allows you to create content for ViewerEx.

Image

Re: [Module] ViewerEx.pbi (all OS)

Posted: Wed Dec 18, 2019 5:47 pm
by skywalk
Thorsten1867 - You are a machine :!: 8)

Re: [Module] ViewerEx.pbi (all OS)

Posted: Thu Dec 19, 2019 5:07 pm
by Thorsten1867
Update: Content Creator
  • Added: Support of multiple pages (incl. linking)
  • Added: Settings (Margins & Pattern for hyphenation)
  • Added: SourceCode (MacOS/Linux)

Re: [Module] ViewerEx.pbi (all OS)

Posted: Fri Dec 20, 2019 2:35 pm
by Thorsten1867
Update: Content Creator
  • resizable
  • ListViewGadget replaced by ListView-Module

Re: [Module] ViewerEx.pbi (all OS)

Posted: Fri Dec 20, 2019 11:50 pm
by Thorsten1867
Update: Content Creator
  • Added: Content Tree (e.g. for help)
  • Added: Preview for content tree

Re: [Module] ViewerEx.pbi (all OS)

Posted: Sat Dec 21, 2019 4:11 pm
by Thorsten1867
Update: HelpEx - simple HelpViewer based on ViewerEx.

Image

Re: [Module] ViewerEx.pbi (all OS)

Posted: Mon Dec 23, 2019 4:29 pm
by Thorsten1867
Update:
  • Added: AddImageText() / ImageText() - text next to an image
  • Added: AddImageListing() / ImageListing() - image instead of bullet

Re: [Module] ViewerEx.pbi (all OS)

Posted: Mon Dec 23, 2019 6:36 pm
by Mindphazer
Hi,
i have this error while compiling on MacOS
I think this procedure is called before its definition

Code: Select all

[18 :28 :21] [COMPILER] Ligne 467: OSX_NSColorToRGB() is not a function, array, list, map or macro.

Re: [Module] ViewerEx.pbi (all OS)

Posted: Mon Dec 23, 2019 10:42 pm
by Andre
Again, a great module with useful extensions (HelpEx)! Thank you very much for sharing :D

Re: [Module] ViewerEx.pbi (all OS)

Posted: Tue Dec 24, 2019 10:53 am
by Thorsten1867
Bugfix for MacOS