Writing a text editor

This is a discussion on Writing a text editor within the C++ Programming forums, part of the General Programming Boards category; hi, I'm trying to write a text editor by using Files, Strings and Classes . I'm not going to ask ...

  1. #1
    Registered User
    Join Date
    May 2008
    Location
    IR, Iran
    Posts
    103

    Writing a text editor

    hi,

    I'm trying to write a text editor by using Files, Strings and Classes.
    I'm not going to ask you to do it for me, I'm just a little confused. I don't know from where I should start and what should I do!

    please help, thanks

  2. #2
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    What do you already know?

    I am assuming it's going to be a graphical text editor, so you will probably want to learn a GUI toolkit like Qt or WxWidgets.

  3. #3
    Registered User
    Join Date
    May 2008
    Location
    IR, Iran
    Posts
    103
    I have never write a graphical program before. I'm so new in C++. not important it would be graphical or not, though graphical is better.

    P.S. I'm working with visual studio 9

  4. #4
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    It's going to be quite complicated graphical or not. So how much C++ do you know?

  5. #5
    Registered User
    Join Date
    May 2008
    Location
    IR, Iran
    Posts
    103
    I don't know how to explain!
    I know about strings (a little), classes, files. but I've never work with them.

  6. #6
    Registered User whiteflags's Avatar
    Join Date
    Apr 2006
    Location
    United States
    Posts
    7,741
    A line by line text editor can be done with rudimentary knowledge of all the things you mention... I recommend deciding what features that you want your text editor to have. What files will the editor be able to modify and how will you modify them?

  7. #7
    Registered User
    Join Date
    Dec 2008
    Posts
    18
    I'm no master at C++ programming (yet), but as long as you know the basics (ie. Functions, Strings, Arrays etc), you might want to google for "Win32 Tutorials". There's a good one I'd highly recommend called "theForger's Win32 API Tutorial". I'm not sure if you can post links here, so I won't .

    Cheers.

  8. #8
    Registered User
    Join Date
    Dec 2006
    Location
    Canada
    Posts
    3,183
    You're certainly allowed to post links here (related, appropriate links).

  9. #9
    Registered User
    Join Date
    May 2008
    Location
    IR, Iran
    Posts
    103
    Quote Originally Posted by whiteflags View Post
    A line by line text editor can be done with rudimentary knowledge of all the things you mention... I recommend deciding what features that you want your text editor to have. What files will the editor be able to modify and how will you modify them?
    I want a simple editor that can cut, copy, paste text and able to save and open files.

  10. #10
    Registered User
    Join Date
    May 2008
    Location
    IR, Iran
    Posts
    103
    Quote Originally Posted by sharkbate24 View Post
    I'm no master at C++ programming (yet), but as long as you know the basics (ie. Functions, Strings, Arrays etc), you might want to google for "Win32 Tutorials". There's a good one I'd highly recommend called "theForger's Win32 API Tutorial". I'm not sure if you can post links here, so I won't .

    Cheers.
    I'm waiting for your link

  11. #11
    C++ Witch laserlight's Avatar
    Join Date
    Oct 2003
    Location
    Singapore
    Posts
    21,941
    Quote Originally Posted by behzad_shabani
    I'm waiting for your link
    Try searching the Web.
    C + C++ Compiler: MinGW port of GCC
    Version Control System: Bazaar

    Look up a C++ Reference and learn How To Ask Questions The Smart Way

  12. #12
    Registered User
    Join Date
    Jan 2009
    Posts
    1
    Quote Originally Posted by behzad_shabani View Post
    I'm waiting for your link
    theForgers win32 API Tutorial

  13. #13
    and the hat of wrongness Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    32,673
    Start with something simple like ed
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.
    I support http://www.ukip.org/ as the first necessary step to a free Europe.

  14. #14
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    As salem says, start simple.

    I wrote a simple editor (be aware that I sort of know what I'm doing - at least I think so ) in a couple of hours a little while back - it's actually posted somewhere in the C section. However, that editor is MUCH simpler than what "ed" can do.

    The display part of an editor is not a particularly large part, if we look at a MODERN, big editor. However, if you haven't written anything fairly complex (like several thousands of lines of code) several times before, going the GUI route may end up more than doubling the task at hand (even more so if you are not writing a relatively complete editor).

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  15. #15
    Registered User
    Join Date
    May 2008
    Location
    IR, Iran
    Posts
    103
    thanks for all ur helps
    I will read these tutorials and my C++ book. I hope that I can do it

Page 1 of 5 12345 LastLast
Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 19
    Last Post: 05-30-2007, 05:47 PM
  2. dtextp: a codeforming text editor
    By dwks in forum A Brief History of Cprogramming.com
    Replies: 0
    Last Post: 05-18-2007, 07:11 AM
  3. struct question
    By caduardo21 in forum Windows Programming
    Replies: 5
    Last Post: 01-31-2005, 03:49 PM
  4. Unknown Memory Leak in Init() Function
    By CodeHacker in forum Windows Programming
    Replies: 3
    Last Post: 07-09-2004, 09:54 AM
  5. Text editor with font color
    By KingoftheWorld in forum A Brief History of Cprogramming.com
    Replies: 6
    Last Post: 01-15-2003, 12:45 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21