Code Monkey home page Code Monkey logo

omnis.xcomp.framework's Introduction

omnis.xcomp.framework

Framework classes for building Omnis Studio XCOMPs

This is a framework I'm working on that combines a number of classes I've (re)written in various shapes and sizes as I've written Omnis Studio XComps over the years. I though it would be nice to donate these to the public domain. If you end up using any of this code feel free to drop me a line and a notice of sorts would be appreciated.

I'm no longer actively maintaining the Studio 4 and Studio 6 support. Expect this to break on Studio 4, Studio 6 will most likely keep working for the foreseeable future. I maintain project files in the framework example repo but am only actively maintaining the Studio 8.1 builds.

More information about the SDK can be found here: https://omnis.net/documentation/extcompsdk/index.jsp

Directories are setup relative and assume the framework is installed within the Omnis SDK folders:

  • Omnis SDK
  • complib
  • omnis.xcomp.framework
  • ...

Or you can submodule it:)

Dependencies

There are support libraries you need to download separately to compile these sources and I've added placeholders for these libraries in the source tree. So far this is limited to STB

Hooks

The subfolder hooks contains a few git hooks you can copy into the .git/hooks subfolder. This ensures clang-format is run on any changed file before committing the changes to the repository. You do need to have clang-format installed.

License

Please note that I'm releasing these works, including my own derivatives under an MIT license. In a nutshell this means you can use the code presented here as you see fit including in commercial projects. All I ask is that you give some credit to this body of work. See the license.txt file for the full license text.

I'm sure I'm stating the obvious that this license does not cover the SDK from Omnis Software, only the code presented here.


Bastiaan Olij - 2018.

omnis.xcomp.framework's People

Contributors

bastiaanolij avatar instinctbas avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

omnis.xcomp.framework's Issues

Add a scale factor that we apply to all drawing functions

Our oBaseVisComponent should get a new property that we apply to all drawing functions called pScale.

This should enlarge how we render things but without our subclassed component needing to worry about this scale factor.

This would be handy for creating the ability for the user to zoom in on the component, to render to bitmap at a higher resolution, or potentially some day add retina support.

Performance issue with oDataList

The way oDataList is currently implemented means that we need to recalculate the positioning of fields whenever the source list changes. When using an item reference we can't adequately determine this and we end up recalculating way to much data each time Omnis gives us a new copy of the reference.

I either need to find a better way of detecting something has changed or make our vertical scroll line based instead of pixel based so I only need to calculate positioning and sizing information for the lines shown on screen (as that is where the bulk of the performance penalty lies).

Investigate whether having a drawing context object makes sense

Right now our drawing functions are methods of our visual component, but that does hinder us somewhat.

Looking into making a separate drawing context object that has these methods, the HDC to use, the clip stack, etc.

This would also make it easier to implement drawing to a bitmap where we need to do so.

Draw into a bitmap

Add a function to our standard visual component that will render our component into a bitmap, potentially irrespective of the size of the component on screen as well as nominating a specific area to render.

This would be especially important for components that cover a large area where we have scroll bars and we want to print the contents. We may need to render each part of the full area in bits and print them over multiple pages (think of things like spreadsheets or graphs).

So the call will be something like:
HBITMAP oBaseVisComponent(qrect pScreen, qrect pRender);

Where pScreen is the rectangle defining our total "screen" are while pRender defines the rectangle within that we'll actually render onto our bitmap.

Wrapping text resets style

As we've implemented our own wrapping text code the new line is drawing in the default style again. We need to find a way to determine more about the style and repeat it.

Clipping issue with drawTextJst

DrawTextJst seems to have an issue with not adhering to the clipping rectangle, especially the vertical boundary.

We may not have any influence on this as this is handled within the SDK, we'll need to look into this further.

Switch to using XCode 6

Changing XCode project files to work with XCode 6.

The biggest issue here is that XCode 6 no longer contains the 1.6 SDK that the Omnis SDK relies on. It has to be copied from XCode 4 into XCode 6 before we can compile.

After that it is a matter of updating the project files and looking into compiler issues.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.