Post Reply 
Virtual calculator: "-" maped as +/-
08-31-2015, 05:10 AM
Post: #10
RE: Virtual calculator: "-" maped as +/-

I am not 100% that this documentation is up to date, but it will give you a lot of info nevertheless..

/** \file skin.h

The main purpose of the Skin system is to provide the user with oportunity to
change the graphical representation of the calculator.
this is done by storing all data nessecary (such as the name of the .bmp file that
represents the calculator, the position of all keys and the definition of the screen)
in a text file with a .skin extention. the skin.dll file
provides a CSkin object that can read all that data and store it useable format.

the format of the text file is as follow:

#comments start with #
#the filename for the picture In order to allow for long filename, the name starts after the =
#and ends at the end of the line
#the size of the visible part of the picture when the window border is visible
#the list of points that bounds the visible part of the picture when the window border is NOT visible
border=x1,y1,x2,y2...xn,yn # polygon for borderless mode
#the position and size of the screen in the picture
#screen foreground and background colors (6 digit RGB color)
#for each calculator key, have a key entry.
#the first parameter is the code that is used by the calculator firmware
#after that, you have the x/y coordinates of the key on the picture
#followed by a list of PC keyboard keycode that will activate the key
#and optionally a location of a 'pressed' key picture (in the picture file) that is used when the key is pressed
#note that the number of keycodes associated with a key is limited to 10
#keycode is the scan key number. note that if shift key is pressed down, 1000 is added to that number
#so that % (shift 5) is 1053
#if text "t" is specified, it will try to match text typed on the keyboard with the key
key=["t",]code,x1,y1,x2,y2,{keycode1[,keycode2...,keycoden]}[,{shift key codes. ie keycode that will produce a shifted versino of this key}][,{Alpha keycodes}][,["text associated with the key for reverse lookup""more"...]][,sx,sy]
#these last 2 items are used to assign a key to the mouse right and middle buttons.
#they will usually be assigned to the shift keys...
#the next part are the screen polygon definitions... they should be one for each pixel of the screen
#the uppercase version if for high resolution copy and paste. SCREEN is the size of the screen
#for high resolution
#if the pixel number is NEGATIVE (ie, starts with a -, even if it's -0), then the syntax is:
#poly=-pixel,x,y,w,h,sx,sy where x/y/w/h is the destination position and size and sx/sy is the source location
#in the backgroud image used to draw...
poly=pixel,{x1, y1, x2, y2....,xn,yn}[{next polygon}]+
POLY=pixel,{x1, y1, x2, y2....,xn,yn}
#express that the screen is a matrix of w*h pixels with n native pixels per matrix pixels
#says that there is an indicator at location x, y, size w, h on the main picture to display on the LCD
# specifies which part of the background picture to display in maximized form...
# specifies that the background picture is in 2 parts that needs to be merged for maximized form
# also specifies an offset to add to the keyboard points location for key maping to skin

Find all posts by this user
Quote this message in a reply
Post Reply 

Messages In This Thread
RE: Virtual calculator: "-" maped as +/- - cyrille de brébisson - 08-31-2015 05:10 AM

User(s) browsing this thread: 1 Guest(s)