Developer forums (C::B DEVELOPMENT STRICTLY!) > Plugins development

BETA - Image Editor plugin

<< < (12/20) > >>

seb_seb0:
svn updated (revision 41) with new code & Unix project file

seb_seb0:
svn updated

1 - Remove files from SVN (*.layout, *.obj, *.depends, build log)
 2 - Remove ColourPickerPanel.cpp and ColourPickerPanel.h (unused - replaced by XPMColourPickerPanel.cpp and XPMColourPickerPanel.h)
     Remove XPMToggleBMPButton.cpp and .h from SVN
 3 - Add help support (via html display. Help remains to be written, but it is limited to writing 6 simple HTML files, located in the resource archive XPMEditor.zip)
 4 - Minimum size needed for the tool panel has been reduced and fixed
 5 - Load and Save file: use dynamic handler instead of static hard-coded switch statements based on file extension
     Moved all the code handling file format into XPMEditor.cpp

seb_seb0:
SVN Updated

 1 - advanced options implemented (JPG compression, PNG options).
 2 - added menu entries in Code::Blocks:
         File/New/New Image
         File/Open with XPMEditor
         wxSmith/Add Image
 3 - added file filter for FileOpen and FileSave dialog box.
 4 - file saving format can now be choosen by the user, bypassing file extension on request.
 5 - start to add fill options

seb_seb0:

--- Quote from: danselmi on April 11, 2010, 01:54:25 pm ---A few thoughts:

* AFAIK it is not foreseen to add a file filter in the global CodeBlocks file open / save dialog box. The only way I found is to generate a lexer-configuration file (even if there does not exist a scintilla-lexer for bitmaps ).
* Why do you not commit the code to the svn repo on sorceforge? It is also helpful for you.
* Most other plugins use CamelCase namings (class and filenames) but this is only a matter of personal taste.
regards,
danselmi

--- End quote ---

Hello danselmi,

I have found a way to add file filters in the File Open / File Save dialog in CodeBlocks
You have to call FileFilters::Add()
You can have a look at how I have done it in XPMEditor.cpp

--- Code: ---void XPMEditor::AddFileMasksToFileOpenSaveDialog(wxArrayString sFileMasks)
{
    wxString sImageMasks;
    wxString sMask;
    size_t i;

    //sImageMasks = wxImage::GetImageExtWildcard();
    sImageMasks = _("");
    for(i=0;i<sFileMasks.GetCount();i++)
    {
        sMask = sFileMasks.Item(i);
        if (sImageMasks.Len() > 0) sImageMasks += _(",");
        sImageMasks += sMask;
    }

    FileFilters::Add(_("Image Files"), sImageMasks);
}
--- End code ---

This one work. I do not know if it is the best way to do it, but it make the job done.

Regards,

Sebastien

seb_seb0:
Hello,

SVN is updated (44)

 1 - Draw Opaque / transparent implemented
 2 - Line Style / Fill Style implemented wherever possible
 3 - Fixed a bug in Expand / Collapse panels at start

To do:
  1 - SHIFT key for drawing Square / Circle / horizontal line / vertical line
  2 - Helps + tooltips
  3 - bug correction (6 bugs to solve, 1 annoying)

Sebastien

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version