flat assembler
Message board for the users of flat assembler.
Index
> IDE Development > Fresh project: We need help. Goto page 1, 2, 3 Next |
Author |
|
decard 21 Nov 2003, 21:49
Hi John,
I can take this I tried to add listbox control, and had no problems with that But I assume that the "real" component design will start when you will add more functionality to the dialog editor, so I will be able to test it. regards |
|||
21 Nov 2003, 21:49 |
|
sina 22 Nov 2003, 01:14
i can ( at least i want to) help in this
|
|||
22 Nov 2003, 01:14 |
|
decard 22 Nov 2003, 17:11
Great! Our team grows!!
VeSCeRa: This is how you can start: go to FreshLast/include/components directory and create some asm file (name doesn't matter). Put there this code: Code: include '..\..\source\designtime.inc' DesignTimeInfo \ \ ; 1. BUTTON CONTROL 'BUTTON', \ 'Button control', \ 'Standard', \ 'MyButton', \ $54010F00, \ ; default style $0, \ ; default ex style 64, 25, \ < \ ; style names 'BS_LEFTTEXT' , 0020h, "", \ 'BS_ICON' , 0040h, "", \ 'BS_BITMAP' , 0080h, "", \ 'BS_LEFT' , 0100h, "", \ 'BS_RIGHT' , 0200h, "", \ 'BS_CENTER' , 0300h, "", \ 'BS_TOP' , 0400h, "", \ 'BS_BOTTOM' , 0800h, "", \ 'BS_VCENTER' , 0C00h, "", \ 'BS_PUSHLIKE' , 1000h, "", \ 'BS_MULTILINE' , 2000h, "", \ 'BS_NOTIFY' , 4000h, "", \ 'BS_FLAT' , 8000h, "" \ >, \ NONE, \ ; style Ex names \ $5E00FFF1, \ ; This is StyleMaskAnd $40000000, \ ; This is StyleMaskOr $FFFABB3F, \ ; This is StyleExMaskAnd $00000000, \ ; This is StyleExMaskOr $00000001, \ ; This is SubtypeMask < \ 'BS_PUSHBUTTON', 0, 'Normal push button',\ 'BS_DEFPUSHBUTTON',1, 'Default push button' \ >, \ ; This is SubtipeRange NONE, \ ; Library file NULL, because it's standard component. 'Button.ico' this will create a simple button control. To add it to the palette, compile this file (binary output), and change it's extension to *.vcl. Then run Fresh. You will see additional button icon in component's palette. Simple, wasn't it? As you can see, the components are defined as a macro DesignTimeInfo. See designtime.inc file for reference to this macro's parameters. That's what I learned about making components in Fresh. Good Luck |
|||
22 Nov 2003, 17:11 |
|
JohnFound 24 Nov 2003, 15:33
VeSCeRa wrote: i can ( at least i want to) help in this Hi, VeSCeRa. As decard wrote, you are welcome in the team. For now it will be very usefull to have all predefined Windows controls in form of Fresh components: 1. From "BUTTON" class: 1.1. "Button" - BS_PUSHBUTTON and BS_DEFPUSHBUTTON 1.2. "Checkbox" - BS_CHECKBOX, BS_AUTOCHECKBOX, BS_3STATE and BS_AUTO3STATE 1.3. "Groupbox" - BS_GROUPBOX 1.4. "Radiobutton" - BS_RADIOBUTTON and BS_AUTORADIOBUTTON 2. From "COMBOBOX" class: 2.1. "Combobox" - CBS_SIMPLE, CBS_DROPDOWN and CBS_DROPDOWNLIST 3. From "EDIT" class: 3.1. "Edit" - ES_MULTILINE not set. 3.2. "Memo" - ES_MULTILINE set. 4. From "LISTBOX" class: 4.1. "Listbox" - there is only one subclass. 5. From "SCROLLBAR" 5.1. "Scrollbar" - with SBS_SCROLLBOX not set 5.2. "Scrollbox" - with SBS_SCROLLBOX set. 6. From "STATIC" 6.1. "Label" - SS_LEFT, SS_RIGHT or SS_CENTER 6.2. "Shape" - SS_BLACKRECT, SS_WHITERECT, SS_BLACKRECT, SS_BLACKFRAME, SS_GRAYFRAME or SS_WHITEFRAME - maybe I am not comprehensive here, please investigate this point. 6.3. "Image" - SS_BITMAP, SS_ICON and maybe SS_METAPICT They don't need any special coding, only description in the form of DesignTimeInfo. For short description of TDesignTimeInfo fields, read the text comments in 'sources\designtime.inc'. If you have some troubles understanding my short notes, feel free to ask. Maybe somewhere I am not very clear. Regards. John Found P.S.: The first tree components (Button, checkbox and groupbox) are in the file BUTTONS.asm in 'include/components/' directory, but there are mistakes in some of the fields - I mean style masks. |
|||
24 Nov 2003, 15:33 |
|
decard 24 Nov 2003, 15:51
It's good that you've made that list Now I'm taking buttons and the list (I started it already).
And, see at the attached picture. Why groupbox'es background is different than form's background? I couldn't avoid it by modifing DesignTimeInfo. [edit]outdated attachment removed[/edit] Last edited by decard on 18 May 2004, 20:13; edited 2 times in total |
|||
24 Nov 2003, 15:51 |
|
JohnFound 24 Nov 2003, 15:54
Decard, if you want you can get some of above controls - you see they are many.
Regards. |
|||
24 Nov 2003, 15:54 |
|
JohnFound 24 Nov 2003, 16:00
Hi decard. Visibly I am late with my last post.
About picture: Please attach it as some other format, jpeg is not proper format for checking colors. GIF or PNG will be OK. It seems that it only looks different because of grid lines, but I can't check it. |
|||
24 Nov 2003, 16:00 |
|
decard 24 Nov 2003, 16:03
Well, I meant that I'm starting with BUTTON class (+it's variants) and LIST class - they are "above controls". I just wanted to show that proably something is wrong with form editor - because it draws groupbox with invlid color.
[edit]OK, now it's PNG. It's definitely not because of the grid [/edit] Last edited by decard on 24 Nov 2003, 16:12; edited 1 time in total |
|||
24 Nov 2003, 16:03 |
|
JohnFound 24 Nov 2003, 16:11
decard wrote: Well, I meant that I'm starting with BUTTON class (+it's variants) and LIST class - they are "above controls". I just wanted to show that proably something is wrong with form editor - because it draws groupbox with invlid color. OK, I will wait for notice from you, when you are ready. However, please make another snapshot of group box in gif format (ot even zipped bitmap). I want to check what is wrong with the colors. Regards. |
|||
24 Nov 2003, 16:11 |
|
JohnFound 24 Nov 2003, 16:16
OK, I got it (Color difference I mean).
I will try to fix it in the next release. It is simply because TForm gives the proper color from Windows, but another controls not. Regards. |
|||
24 Nov 2003, 16:16 |
|
decard 25 Nov 2003, 17:55
John, what about SubTypeMask field in DesignTimeInfo? I'm not quite sure what value to put in it, the description says that the BUTTON class should have it set to 0x0f, while it is 0x01 in push button, 0x03 in checkbox, and 0x07 in groupbox.
|
|||
25 Nov 2003, 17:55 |
|
JohnFound 25 Nov 2003, 18:30
decard wrote: John, what about SubTypeMask field in DesignTimeInfo? I'm not quite sure what value to put in it, the description says that the BUTTON class should have it set to 0x0f, while it is 0x01 in push button, 0x03 in checkbox, and 0x07 in groupbox. Hi decard. Windows BUTTON class have following subtypes: Code: BS_PUSHBUTTON = 0000h BS_DEFPUSHBUTTON = 0001h BS_CHECKBOX = 0002h BS_AUTOCHECKBOX = 0003h BS_RADIOBUTTON = 0004h BS_3STATE = 0005h BS_AUTO3STATE = 0006h BS_GROUPBOX = 0007h BS_USERBUTTON = 0008h BS_AUTORADIOBUTTON = 0009h BS_OWNERDRAW = 000Bh The SubtypeMask field is the smallest mask that can separate only these subtype numbers that our control may have. For example the Button control may have only BS_PUSHBUTTON = 0 and BS_DEFPUSHBUTTON = 1. So, the mask that can separate this subtypes is 1. Checkbox control may have subtypes 2, 3 (and maybe 5 and 6). So the mask will be $3 (or $7 in second case). Actually this is not so important, because there is list with possible subtypes, and I think it is no problem to use one mask $0f for all subtypes of the BUTTON class. However, for other Windows classes this mask may be different. Regards. |
|||
25 Nov 2003, 18:30 |
|
Betov 25 Nov 2003, 19:51
[ButtonCheckingMask:
0F 0F 0F 0F 0F 0F 0F 0F 0F 0F0 0300 0300 0300 0C00 0C00 0C00 0F 0F0 0F0 02000 04000 01000 08000 010000] [ButtonExcludeBitTable: 0FFFF 0FFFF 0FFFF 0FFFF 0FFFF 0FFFF 0FFFF 0FFFF 0FFFF 0 0300 0300 0300 0C00 0C00 0C00 0F 0F0 0F0 0 0 0 0 0] [ButtonTextTable: B$ 'BS_PUSHBUTTON' 0 'BS_DEFPUSHBUTTON' 0 'BS_CHECKBOX' 0 'BS_3STATE' 0 'BS_AUTOCHECKBOX' 0 'BS_AUTO3STATE' 0 'BS_RADIOBUTTON' 0 'BS_AUTORADIOBUTTON' 0 'BS_GROUPBOX' 0 'BS_LEFTTEXT' 0 'BS_LEFT' 0 'BS_RIGHT' 0 'BS_CENTER' 0 'BS_BOTTOM' 0 'BS_TOP' 0 'BS_VCENTER' 0 'BS_OWNERDRAW' 0 'BS_BITMAP' 0 'BS_ICON' 0 'BS_MULTILINE' 0 'BS_NOTIFY' 0 'BS_PUSHLIKE' 0 'BS_FLAT' 0 'WS_TABSTOP' 0, 0] [ButtonBitTable: &BS_PUSHBUTTON &BS_DEFPUSHBUTTON &BS_CHECKBOX &BS_3STATE &BS_AUTOCHECKBOX &BS_AUTO3STATE &BS_RADIOBUTTON &BS_AUTORADIOBUTTON &BS_GROUPBOX &BS_LEFTTEXT &BS_LEFT &BS_RIGHT &BS_CENTER &BS_BOTTOM &BS_TOP &BS_VCENTER &BS_OWNERDRAW &BS_BITMAP &BS_ICON &BS_MULTILINE &BS_NOTIFY &BS_PUSHLIKE &BS_FLAT &WS_TABSTOP] ; &BS_RIGHTBUTTON &BS_TEXT [ButtonMustHaveBitTable: 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0] [BS_PUSHBUTTONhelp: "BS_PUSHBUTTON: The button posts a WM_COMMAND message to its parent when pushed.", 0 BS_DEFPUSHBUTTONhelp: "BS_DEFPUSHBUTTON: The button behaves like with BS_PUSHBUTTON, but has a enhanced border and reacts as default OK, when user hits Return.", 0 BS_CHECKBOXhelp: "BS_CHECKBOX: Empty check box with text. The default text Pos (at right) may be changed with BS_LEFTTEXT.", 0 BS_3STATEhelp: "BS_3STATE: Same as check box, but it can be grayed, checked or unchecked.", 0 BS_AUTOCHECKBOXhelp: "BS_AUTOCHECKBOX: Same as check box, but the state automatically toggles on user action.", 0 BS_AUTO3STATEhelp: "BS_AUTO3STATE: Same as Three-state check box, but the state automatically toggles on user action.", 0 BS_RADIOBUTTONhelp: "BS_RADIOBUTTON: Small circle with text. The default text Pos (at right) may be changed with BS_LEFTTEXT.", 0 BS_AUTORADIOBUTTONhelp: "BS_AUTORADIOBUTTON: Same as a radio button, but the state automatically toggles on user action.", 0 BS_GROUPBOXhelp: "BS_GROUPBOX: Not really a button. Creates a rectangle in which other controls can be grouped, with eventually a common title.", 0 BS_LEFTTEXThelp: "BS_LEFTTEXT: Places text on the left side of the radio button or check box.", 0 BS_LEFThelp: "BS_LEFT: Left-justified the text in the button rectangle. Note: If the button is a check box or radio button without BS_RIGHTBUTTON, the text is left justified on the right side of the control.", 0 BS_RIGHThelp: "BS_RIGHT: Right-justified text in the button rectangle. Note: If the button is a check box or radio button without BS_RIGHTBUTTON, the text is right justified on the right side of the control.", 0 BS_CENTERhelp: "BS_CENTER: Centers the text horizontally in the button rectangle.", 0 BS_BOTTOMhelp: "BS_BOTTOM: Places the text at the bottom of the button rectangle.", 0 BS_TOPhelp: "BS_TOP: Places the text at the top of the button rectangle.", 0 BS_VCENTERhelp: "BS_VCENTER: Centers vertically the text on the button rectangle.", 0 BS_OWNERDRAWhelp: "BS_OWNERDRAW: The owner window will receives a WM_MEASUREITEM message at creation time and a WM_DRAWITEM message after the visual aspect change is done. Can't be combined with any other button styles.", 0 BS_BITMAPhelp: "BS_BITMAP: The button will display a bitmap. You set it in your Proc.", 0 BS_ICONhelp: "BS_ICON: The button will display an Icon. You set it in your Proc.", 0 BS_MULTILINEhelp: "BS_MULTILINE: Allows multiple lines if the text string is too long to fit with the button width.", 0 BS_NOTIFYhelp: "BS_NOTIFY: The button will send BN_DBLCLK / BN_KILLFOCUS / BN_SETFOCUS notification messages to its parent. Note: BN_CLICKED is always send, even without this style. ", 0 BS_PUSHLIKEhelp: "BS_PUSHLIKE: Makes a check box or a radio button look like a button, with a state holding behaviour.", 0 BS_FLAThelp: "BS_FLAT: The button borders are visible only when activated", 0] [ButtonStylesHelp: BS_PUSHBUTTONhelp BS_DEFPUSHBUTTONhelp BS_CHECKBOXhelp BS_3STATEhelp BS_AUTOCHECKBOXhelp BS_AUTO3STATEhelp BS_RADIOBUTTONhelp BS_AUTORADIOBUTTONhelp BS_GROUPBOXhelp BS_LEFTTEXThelp BS_LEFThelp BS_RIGHThelp BS_CENTERhelp BS_BOTTOMhelp BS_TOPhelp BS_VCENTERhelp BS_OWNERDRAWhelp BS_BITMAPhelp BS_ICONhelp BS_MULTILINEhelp BS_NOTIFYhelp BS_PUSHLIKEhelp BS_FLAThelp WS_TABSTOPhelp] Betov. |
|||
25 Nov 2003, 19:51 |
|
decard 26 Nov 2003, 14:21
Hi John,
I've just done the BUTTONs and by the way I thought about some changes to the component's design: what about the additional 'components/source/' directory? The main dir wouldn't be so messed. Also, I added winconst.inc file (with component specific constants, like BS_*) to this dir to make design a bit easier (for example see button.asm). What do you think about this? I uploaded the whole 'components' dir (it is guite small), so you can just replace your dir with my one, and it will work. I've alredy started another components, but first I want to know your opinion about my changes. And sorry that it took so long but I have a very busy week in school regards [edit]outdated attachment removed[/edit] Last edited by decard on 18 May 2004, 20:10; edited 1 time in total |
|||
26 Nov 2003, 14:21 |
|
JohnFound 26 Nov 2003, 15:08
Hi decard.
Really good work. Thank you. Only one note, put WS_CHILD in default window style field. I will make form designer to check this style, but IMO, it is good to have right values in .vcl files. About new dir structure - I am fully agree. It makes the files more ordered. About the time: Don't worry. There is not deadline for Fresh. Just now I am deeped in the project manager and source editor. There are so many changes, that I can't write them to history.inc. So the next release will late a little. Keep good work, but don't forget for the school. Regards. |
|||
26 Nov 2003, 15:08 |
|
decard 26 Nov 2003, 15:49
Hmmm, I put WS_CHILD in StyleMaskOR, and I thought that it will be enough.
Good to hear that you're making progresses - I can't wait for the moment when I will be able to use this controls in Fresh |
|||
26 Nov 2003, 15:49 |
|
JohnFound 26 Nov 2003, 16:57
decard wrote: Hmmm, I put WS_CHILD in StyleMaskOR, and I thought that it will be enough. Yea, you are right in principle. Form editor should corect the style when the control is created. But at first this is not implemented yet, and at second I think that it is good to use valid value in control description, not to wait Fresh to correct it. Quote: I can't wait for the moment when I will be able to use this controls in Fresh Me too. |
|||
26 Nov 2003, 16:57 |
|
sina 28 Nov 2003, 02:11
i am so sorry that i am so late for my post
its becouse of the terrorist attacks that ruined my life that i did not have time for these so decard finished buttons and now making lists and i think he is going for all how can i help? i have seen the earlier posts and i think i understood the structure and i also think that i am not as experienced in win32 asm as you but i am sure i want to help about something and someone |
|||
28 Nov 2003, 02:11 |
|
JohnFound 28 Nov 2003, 09:37
VeSCeRa wrote: i am so sorry that i am so late for my post Hi VeSCeRa. I can't find words to express my feelings, about terrorists atacks in Turkey. (And any other terrorist attacks in the World) It is strange and pity that humans may die because of religion in the 21st sentury. I hope you don't lost some friends. About Fresh components, there is a lot of work, so if you want to help, you are welcome. Decard made only Buttons and Listbox. Look on my previous post (immediately after your post on previous page) - there is a list with components we need. You may begin with "STATIC" or "EDIT" classes. Best regards. |
|||
28 Nov 2003, 09:37 |
|
Goto page 1, 2, 3 Next < Last Thread | Next Thread > |
Forum Rules:
|
Copyright © 1999-2024, Tomasz Grysztar. Also on GitHub, YouTube.
Website powered by rwasa.