Snippet Manager v2

Cross platform + Cloud storage

  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »

76 Replies - 8620 Views - Last Post: 27 October 2009 - 12:41 AM

#1 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1433
  • View blog
  • Posts: 11,006
  • Joined: 06-February 08

Snippet Manager v2

Posted 16 July 2009 - 12:29 PM

Been a while since I posted in this forum. :)

I'm sure some of you will remember the snippet manager that I wrote last year, right? C#.NET, and to be honest with you, it was a piece of crap. It was my first ever GUI project, and I had absolutely NO idea what I was doing. :)

Well, almost a year on, and I'm back - ready to write a new version. I found I actually already had some stuff done, but I'm working on it now and will be over the weekend, in order to get the main features ready.

Current Features:
  • Cloud storage (with public/private storage)
  • Browse all public snippets
  • Cross platform (developed in C++ / wxWidgets)
  • Clipboard recorder
Planned Features:
  • Syntax Highlighting (when I figure out how the hell I use wxStyledTextCtrl properly)
  • Line numbering (again, when I figure out the wxStyledTextCtrl)
  • More slick, customisable UI
There'll be a lot more, but that's all for now.

Here's a quick mockup of how I'd like it to look eventually.

edit,
Cloud snippets are categorised by languages now. :)
Posted Image

Attached image(s)

  • Attached Image
  • Attached Image

This post has been edited by gabehabe: 16 July 2009 - 12:57 PM


Is This A Good Question/Topic? 1
  • +

Replies To: Snippet Manager v2

#2 Speedy_92   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 57
  • Joined: 02-July 09

Re: Snippet Manager v2

Posted 16 July 2009 - 02:09 PM

Hi,
If you are interested in, you could take a look at this and this one additionally because of you Syntax Highlighting problem. You could figure out your own way to highlight the code.

Was just a small note, but maybe it'll help :)
Was This Post Helpful? 0
  • +
  • -

#3 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1433
  • View blog
  • Posts: 11,006
  • Joined: 06-February 08

Re: Snippet Manager v2

Posted 16 July 2009 - 02:22 PM

Thanks, but I'll stick with wxStyledTextCtrl. It's a wrapper for Scintilla which is by far the best syntax highlighter available. (Notepad++ uses it)

Also, that's a C# control. I'm using C++ :)

This post has been edited by gabehabe: 16 July 2009 - 02:23 PM

Was This Post Helpful? 0
  • +
  • -

#4 Speedy_92   User is offline

  • D.I.C Head

Reputation: 1
  • View blog
  • Posts: 57
  • Joined: 02-July 09

Re: Snippet Manager v2

Posted 16 July 2009 - 02:34 PM

Oh, damn.. Sorry xD

Have just seen "C#" and "Syntax Highlighting" and just thought at this article ;)

But good luck with you project anyway :)
Was This Post Helpful? 0
  • +
  • -

#5 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1433
  • View blog
  • Posts: 11,006
  • Joined: 06-February 08

Re: Snippet Manager v2

Posted 17 July 2009 - 09:37 AM

Updates:
  • Line numbering
  • Closable tabs
  • Load your own snippets from the cloud
Posted Image

It currently *doesn't* load locally, but it's not difficult to implement. Was more focused on the cloud aspect of it for the beginning.

Next updates:
  • Items on the left will be collapsible
  • Browse public snippets (new window & new section on the left)
  • Find/replace
Also, things I'd like to implement in the near future:
  • Plugins
  • Regex builder (along with regex find/replace)
  • Syntax highlighting (I'm not rushing to do this one, I know it can be done easily with the control so I'm not worried about it)
Suggestions welcome. :)

Attached image(s)

  • Attached Image

This post has been edited by gabehabe: 17 July 2009 - 09:37 AM

Was This Post Helpful? 0
  • +
  • -

#6 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1433
  • View blog
  • Posts: 11,006
  • Joined: 06-February 08

Re: Snippet Manager v2

Posted 17 July 2009 - 10:29 AM

Figured I'd share this. This is the awesome power of the wxAuiNotebook.

Attached image(s)

  • Attached Image

This post has been edited by gabehabe: 19 July 2009 - 11:44 AM

Was This Post Helpful? 0
  • +
  • -

#7 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1433
  • View blog
  • Posts: 11,006
  • Joined: 06-February 08

Re: Snippet Manager v2

Posted 18 July 2009 - 06:57 AM

Gonna push for a release by the end of this weekend. Won't have syntax highlighting, but I'm currently working on a search/browse feature for public snippets. It'll be much appreciated if anyone wants to start contributing snippets for public use once I release it. ;)
Was This Post Helpful? 0
  • +
  • -

#8 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1433
  • View blog
  • Posts: 11,006
  • Joined: 06-February 08

Re: Snippet Manager v2

Posted 18 July 2009 - 09:11 AM

Public browser now functional. :)

http://twitpic.com/artsg

This post has been edited by gabehabe: 18 July 2009 - 10:57 AM

Was This Post Helpful? 0
  • +
  • -

#9 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1433
  • View blog
  • Posts: 11,006
  • Joined: 06-February 08

Re: Snippet Manager v2

Posted 22 July 2009 - 08:35 AM

No one is interested this time round. :(

Got login/logout stuff done last night. I'll get a registration tab done, and might release tonight. :D Anyone up for some beta testing?

This post has been edited by gabehabe: 22 July 2009 - 08:35 AM

Was This Post Helpful? 0
  • +
  • -

#10 [email protected]   User is offline

  • JMP *0x0(%RIP)
  • member icon

Reputation: 37
  • View blog
  • Posts: 1,019
  • Joined: 20-February 09

Re: Snippet Manager v2

Posted 22 July 2009 - 11:46 AM

ill do it :)
Was This Post Helpful? 0
  • +
  • -

#11 Amrykid   User is offline

  • 4+1=Moo
  • member icon

Reputation: 150
  • View blog
  • Posts: 1,589
  • Joined: 16-December 08

Re: Snippet Manager v2

Posted 22 July 2009 - 11:57 AM

View Post[email protected], on 22 Jul, 2009 - 11:46 AM, said:

ill do it :)

me too :D
Was This Post Helpful? 0
  • +
  • -

#12 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1433
  • View blog
  • Posts: 11,006
  • Joined: 06-February 08

Re: Snippet Manager v2

Posted 22 July 2009 - 12:34 PM

:D Thanks!

Release won't be tonight, I had more to do on it than I expected. However, it will 100% be ready before Sunday. (More likely saturday, I won't be deving much on Friday since it's my birthday) :)

In the past hour, I've implemented:
  • Save/Save As
  • Save Locally
  • Cloud save
  • Registration
  • IP recognition & auto-login
  • Made a few bugfixes

So I'm quite pleased with today's progress. :)

Things left to do before release:
  • bugfixes - simple solutions, won't take long
  • Account management tab - for managing shared snippets and remembered IP addresses for auto-login
  • Save All (won't take long, just a quick for loop and call save locally / cloud save according to a simple bool in each tab)
  • Download shared snippet to local directory (via the public search screen)
  • Details of who shared the snippet, along with a view counter, on the search screen
  • "Favourite" public snippets, which will appear in the tree on the left - snippets by others that you like, and want quick access to from any machine
And I think that's about it for the first pre-release!

Syntax highlighting will be implemented when I can be arsed to sort this wxStyledTextCtrl out - its pretty frustrating. (It highlights /** this **/ but I don't even know why lol)
Was This Post Helpful? 0
  • +
  • -

#13 xclite   User is offline

  • I wrote you an code
  • member icon


Reputation: 1281
  • View blog
  • Posts: 4,090
  • Joined: 12-May 09

Re: Snippet Manager v2

Posted 22 July 2009 - 01:07 PM

Interesting. Looking forward to the release!
Was This Post Helpful? 0
  • +
  • -

#14 PDUNZ   User is offline

  • D.I.C Regular
  • member icon

Reputation: 50
  • View blog
  • Posts: 376
  • Joined: 17-July 09

Re: Snippet Manager v2

Posted 22 July 2009 - 07:59 PM

Count me in for testing B)
Was This Post Helpful? 0
  • +
  • -

#15 gabehabe   User is offline

  • GabehabeSwamp
  • member icon




Reputation: 1433
  • View blog
  • Posts: 11,006
  • Joined: 06-February 08

Re: Snippet Manager v2

Posted 23 July 2009 - 02:39 AM

You guys are now my motivation, finally decided to get syntax highlighting done. :)
Posted Image

Spent the last hour on it figuring out which number means what. Work is slow. :wink:

Code, for safe keeping:
#ifndef SNIPPET_STC_H_INCLUDED
#define SNIPPET_STC_H_INCLUDED

#include <wx/stc/stc.h>
#include "snippet.h"
#include <wx/font.h>

class snippet_stc : public wxStyledTextCtrl {
    public:
        snippet_stc(wxWindow* parent) : wxStyledTextCtrl(parent, wxID_ANY, wxDefaultPosition, wxDefaultSize){
            this->SetMarginType(1, wxSTC_MARGIN_NUMBER);
            this->SetIndentationGuides(1);
            this->SetBackSpaceUnIndents(0);
            this->SetIndent(4);
            wxFont default_font(10, wxMODERN, wxNORMAL, wxNORMAL);
            for(int i = 0; i < 100; i++) {
                this->StyleSetFont(i, default_font);
            }
            this->StyleSetForeground(1, wxColour(140, 140, 140)); // comments (/* */)
            this->StyleSetForeground(2, wxColour(140, 140, 140)); // comments (//)
            this->StyleSetForeground(3, wxColour(0, 140, 0)); //  comments (/** **/)
            this->StyleSetForeground(4, wxColour(255, 0, 255)); //  numbers
            this->StyleSetForeground(5, wxColour(0, 0, 190)); // keywords
            this->StyleSetBold(5, true); // keywords
            this->StyleSetForeground(6, wxColour(0, 0, 255)); //  string literals
            this->StyleSetForeground(9, wxColour(0, 140, 0)); //  preprocessor
            this->StyleSetForeground(10, wxColour(255, 0, 0)); // operators
            this->StyleSetForeground(11, wxColour(20, 20, 20)); //  function names

            this->SetMarginWidth(1, 27); // line numbers
            this->SetLexer(wxSTC_LEX_CPP);
            this->SetKeyWords(0, wxT("this public class int for true"));
        }
        snippet snip;
};

#endif // SNIPPET_STC_H_INCLUDED


Needs cleaning, but it's not too bad for a start. :)

Attached image(s)

  • Attached Image

Was This Post Helpful? 0
  • +
  • -

  • (6 Pages)
  • +
  • 1
  • 2
  • 3
  • Last »