Announcement

Collapse
No announcement yet.

InfoView

Collapse
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • InfoView

    I'm working on re-writing the virtual table to use a series of interfaces instead. If you'd like to see it you can download the current version here. Once it stablizes a bit, I'll put it in the source code forum.

    Edit: Files were giving me grief uploading. Get the resources here, and the EXE here.

    It has a few unique features: It extends by implementing one or more iExtend interfaces. New "views" can be created by implementing the view as an iExtend. You can get the idea with the table view. I'll be working on a Form view before long. Also each part of the control is drawn using an iRender. Several are already written and you can write additional ones and apply them to a particular drawing part and state. Data is provided by implementing an iDataSource, you simply return an appropriate value for a row and column. A DataTable DataSource is in the demo using the datatable I wrote previously.

    One last work about the demo. The top listbox will activate what you click on. The middle listbox simply selects the next renderer you will apply. The bottom listbox applies the renderer from the middle list box to the item you click on. Usage of the bottom two listboxes goes like this:

    Select an entry in the middle, click on the entry in the bottom to apply that. Repeat.

    Note that Cell Text will probabbly only make sense if you use the Text renders at the bottom of the middle list. Also using a Text renderer for any other part of the grid probabbly won't make sense either.

    Executables in the zip file. You can recompile by compliing Test.bas.



    Edit: Added Row and Content background renderers. In general it renders like this:
    Table/Control background - full area
    Column headers
    Row headers
    Content background - data area
    Row backgrounds - Background of rows
    Cell Backgrounds - background of cells
    Row selectors - row background overlays / decorations
    Cell selectors - cell background overlays / decorations
    Cell focus
    Cell foreground - Cell contents
    Row focus
    Vertical grid
    Horizontal grid

    If you want a row background renderer to display somthing, set the cell background to none, and so on.

    Also added a few more renderers (Raised/Sunken frames)

    Next up: Icons, Bitmaps, Checkboxes, Option buttons, and friends.
    Last edited by Larry Charlton; 3 Sep 2011, 07:17 PM.
    LarryC
    Website
    Sometimes life's a dream, sometimes it's a scream

  • #2
    Added column and focus renderers.
    Added user overrides.
    Added icon, checkbox, radio button, image, sunken, raised renderers
    Added selection and hot tracking style (None, Cell, Row)
    Modified rendering logic some
    Changed a few property names to more acurately reflect their purpose.
    Updated demo for checkbox, radio button, icon renderers and selection/hot tracking

    Added mappers to iValue renderers. Allows user defined mapping of checked states, icons, images, etc. Can also be used to reformat values when rendering, for example formatting dates, or numbers, etc.

    Edit: Added support for bitmaps with no stretch, min stretch, max stretch, fill, tile x, tile y, tile x, y, and placed.
    Updated demo to include fill, tilexy, bottom right image demos. (Probabbly looks best if you set cellback to none, and set content to one of the two image renderers.
    Last edited by Larry Charlton; 3 Sep 2011, 07:22 PM.
    LarryC
    Website
    Sometimes life's a dream, sometimes it's a scream

    Comment


    • #3
      Hi Larry,
      there is problem when I try to download a zip
      Dubravko

      Comment


      • #4
        Sorry, FTP was being cranky, should work now.
        LarryC
        Website
        Sometimes life's a dream, sometimes it's a scream

        Comment


        • #5
          Thanks - it work now! :coffee4:
          Dubravko

          Comment


          • #6
            Added a simple form view.
            Created an extension (currently bound to F12) to switch views.
            Reorganized the source files:
            ctl - Source for control / view files
            datatable - Source for datatable/dataview/dataset
            misc - Supporting source files
            render - Renderers
            res - Resources
            In the top and bottom lists: items with a * apply to both form and table views. All renderers work on both.

            A couple notes on navigate:
            F12 - Switch views
            Tab to cycle through controls
            Clicking a list item now focuses the infoview control

            Table
            Mouse Wheel - Scroll rows
            Control + Mouse Wheel - Scroll columns
            Arrow keys
            End - last col
            Home - first col
            Control+End - Last cell
            Control+Home - First cell
            Page up/down - page
            If resizing is on, drag when sizing arrows show to resize column

            Form
            Mouse Wheel - Scroll rows
            Control + Mouse wheel - Scroll columns
            Up/down arrow keys - next/prev col
            Home - first col
            End - last col
            Control+Home - first cell
            Control+End - last cell
            Page up - Prev record
            Page down - Next record

            Edit: Also not sure if I mentioned it, but to compile you need to put the resources (separate download) in the res sub directory. The EXE will work standalone.
            Last edited by Larry Charlton; 4 Sep 2011, 03:32 PM.
            LarryC
            Website
            Sometimes life's a dream, sometimes it's a scream

            Comment


            • #7
              A few minor updates:

              Reorganized renderer source
              Consolidate RenderBar, RenderBarRight, Extened to support bars on a particular side.
              Added Split renderer
              Consolidated Sunken and Raised renderers in Bevel, added other bevels.
              Fixed placement of image renderers.
              Renamed renderers
              Removed decorations, acheive the same effect by creating compound backgrounds.
              Added simple name to title support.
              Added a custom sizing cursor.
              Updated demo: Placed renderers and parts in categories. Added some more custom renderers.
              Added custom column backgrounds. See the effect with forms when rendering icons, checkboxes, or radio buttons.
              LarryC
              Website
              Sometimes life's a dream, sometimes it's a scream

              Comment


              • #8
                Added pivot datasource
                Added datasource row/col count
                Added datasource row/col count change subscriptions
                Added table/form range selection via drag, shift click, shift navigation
                Added table/form copy selected with optional copy headers
                Changed view keys, bound next/previous views to alt + left or right
                LarryC
                Website
                Sometimes life's a dream, sometimes it's a scream

                Comment


                • #9
                  Minor updates

                  Added directional gradients, thanks to Jordi Vallès, Gary Beene, and Chris Boss for excellent posts assisting with this.
                  Added a CardView.
                  Fixed a couple of bugs.

                  Might be a bit of a pause on updates is the main reason I posted this. I'm thinking it would be better to manage some of the layout aspects with layout managers, so I'll be looking at implementing a few of those and probabbly pushing them back through the existing views. I'm also considering implementing renderers for the views as well i.e. a grid renderer, form renderer, card renderer. I think in the long run, this will make the project more flexible. I think it may also allow the project to be more efficient in the long run where only used features are actually included.
                  LarryC
                  Website
                  Sometimes life's a dream, sometimes it's a scream

                  Comment


                  • #10
                    Small update. Added layouts, mostly back where it was last time. Dragging selections better, more code reuse, as a result forms can have frozen columns, resizing can be rows or columns now, also it can be full row resizing or just headers. Also layouts double as renderers.

                    Also renamed controls to reflect what's being done. Now there's IVRowColumn (Table), IVCol (Form), and IVRow (Cards).

                    Next stop another layout or two for custom form layouts on the cards.

                    Spent an inordinate amount of time hunting for a bug with dragging, WM_TIMER wasn't firing on the grid but would on other controls. Turned out to be simply that WM_TIMER is a low priority event and the Paint routine had a bug that caused it to immediately repaint... Some days it's more of a journey than others :noob2:

                    Edit: Small update. Fixed a few graphics issues and a scrolling issue. Put a sequential layout on the cards.
                    Last edited by Larry Charlton; 18 Sep 2011, 01:13 PM.
                    LarryC
                    Website
                    Sometimes life's a dream, sometimes it's a scream

                    Comment


                    • #11
                      Absolutely impressive !!!

                      Very nice.

                      You have the basis for something which could become a commercial quality control.
                      Chris Boss
                      Computer Workshop
                      Developer of "EZGUI"
                      http://cwsof.com
                      http://twitter.com/EZGUIProGuy

                      Comment


                      • #12
                        Thanks. I've been having fun and learning quite a bit. Hopefully someone else will find some use for it as well.
                        LarryC
                        Website
                        Sometimes life's a dream, sometimes it's a scream

                        Comment


                        • #13
                          • Added a bound renderer, allows optional placement of prompt on a side. I'm thinking of replacing the special prompt rendering of IVCol with the generic bound renderer. Will be able to acheive same look but have more flexibility.
                          • Added padding settings to IVCol and IVRow. Will allow for things like asymetrical cards and insetting contents.
                          • Added RenderOffset, or as I like to think of it, nudging. Mostly useful with the compound renderer.
                          • Updated compound renderer to support values and alignment.
                          • Updated demo card to use sequential layout with bound renderers.
                          • Redid notifications. They're similar to windows events. An iReceive can subscribe to an iSend. Implmented a generic iSend with an iPublish. DataTables publish row/column count changes, DataSource subscribe and forward data table notices and publish value changes, and data source changes. Implemented an iCurrent class that subscribes and forwards data source events and publishes row, column changes. Currently not in use, but I plan to remove the individually implmeneted currency managers (current row/col, rowcount, colcount with iCurrent. Should make things like synchronizing to different views easier, now you can do everything from share nothing to share everything.
                          Edit
                          • Fixed a flow layout bug for columns
                          • Changed demo cards (Now there's a 2 column flow with prompts below in a 4x4 row flow and fixed size sequential with custom prompts on left)
                          • Removed prompts from IVCol, updated demo forms to use BoundRenderers
                          Last edited by Larry Charlton; 19 Sep 2011, 05:00 PM.
                          LarryC
                          Website
                          Sometimes life's a dream, sometimes it's a scream

                          Comment


                          • #14
                            • Created font class, this will facilitate disposing of the font as well as making it easier to measure strings, find baselines, etc.
                            • Updated everything to use iFont
                            • Added positioned icons in the 9 regions of a square ( Top, Middle, Bottom / Left, Center, Right )
                            • Added Simple layout, does relative and fixed layouts on a line. Def format is col[:width[:height]], Negative width heights are positioned relatively while positive values are fixed widths. The relative positions are distributed evenly based on the total relative sizes. Distribution area is the total area minus any fixed area. Each field on a line is separated by a comma (,). Each line is separated by a carriage return and line feed. Fields can be shown in any order and can be omited.
                            • Added Positioned layout with simple anchors. Can be anchored Left, Top, Right, or Bottom. Def format is col:left:top:width:height:anchor. Anchors are L, T, R, and/or B. Each field is separated with a carriage return, linefeed. Fields can be shown in any order and can be omitted.
                            • Updated demo to show new layouts. Simple layout does a 60/40 split on one line and a right and left fixed width with a central relative width field. The Positioned Layout anchors stretch the first field on the first line, the last field on the last line, and the bottom line.
                            If you're compiling, the resources were updated. Put the files in the res subdirectory.
                            LarryC
                            Website
                            Sometimes life's a dream, sometimes it's a scream

                            Comment


                            • #15
                              I added compiling to a DLL. In the DLL subdirectory, compile Infoview.bas. You can test it by compiling TestDLL.bas.

                              I also added compiling to an SLL but it's not working. Compile's working, linking is working, running not so much. For some reason when it calls the iWinTrack interface it dies a horrible death. Nothing special there, separate testing shows that sort of thing should work. objects are all nice instances and even of that interface. Still when I call the Add method I GPF before I get into the Add method. Not that invested in getting it to work right at the moment, sorry for anyone that wanted an SLL.

                              Small correction. I actually do get into the Add method, blowing up just testing if an object is an interface. Here's the code from misc\WinTrack.inc
                              Code:
                                  Method Add( ByRef obj As iWin )
                                    Local i As Long
                                    Local ub As Long
                                    MsgBox "Made it into WinTrack.Add!"
                                  ' Blows up on next line...
                                   If IsFalse IsInterface( obj, iWin ) Then
                                      MsgBox "Exiting because obj is not an iWin"
                                      Exit Method
                                    End If
                                    MsgBox "Have an iWin interface"
                                    If IsWindow( obj.HWnd ) = 0 Then Exit Method
                                    MsgBox "obj has an HWnd"
                              And here's the calling code from ctl\IVBase.inc:
                              Code:
                                  If IsInterface( givTrack, iWinTrack ) Then
                                    MsgBox "Interface is happy"
                                    If IsInterface( win_, iWin ) Then
                                      MsgBox "win_ is an iWin!"
                                    End If
                                    givTrack.Add( win_ )
                                  End If
                              updated file is the same link here.
                              Last edited by Larry Charlton; 2 Oct 2011, 09:17 AM.
                              LarryC
                              Website
                              Sometimes life's a dream, sometimes it's a scream

                              Comment


                              • #16
                                Ok, added an SLL. imo it's a poor excuse for an SLL, but it was easy and it worked. Essentially I just compiled all the files that went into the dll into a single .sll file. That seemed to link and run fine. compiling the individual files and building a pblib, not so much.

                                If anyone from PB is listening, for what it's worth, with 63 files compiled individually into a pblib or compiled into a single sll ends up with a main program that compiles and links slower than compiling all the source straight up, somewhat counter intuitive, leaving the SLL's as a nice way to be able to compile with different headers and hiding globals, etc but at the cost of speed during compilation.

                                Also for anyone that downloaded the exe file, sorry I hadn't updated it. It's updated now with all three exe versions as well as the .dll and .sll file.
                                LarryC
                                Website
                                Sometimes life's a dream, sometimes it's a scream

                                Comment


                                • #17
                                  Hi Larry,
                                  something wrong with link to sources ?
                                  Dubravko

                                  Comment


                                  • #18
                                    Should be fine. I was trying to create a theme for my blog and having to recycle the app pool several times. That might have been the issue. Holler if it still isn't working for you.
                                    LarryC
                                    Website
                                    Sometimes life's a dream, sometimes it's a scream

                                    Comment


                                    • #19
                                      Unfortunatly
                                      I got 404 Http error see attachement.
                                      Attached Files
                                      Dubravko

                                      Comment


                                      • #20
                                        So right. It's fixed. Sorry bout that. Due to issues with my slow link I upload under a different name, remove the original, and then rename. Seems I missed the last step last time. It's all good now, at least until next time.
                                        LarryC
                                        Website
                                        Sometimes life's a dream, sometimes it's a scream

                                        Comment

                                        Working...
                                        X