wxScrollText class Topic is solved

If you have a cool piece of software to share, but you are not hosting it officially yet, please dump it in here. If you have code snippets that are useful, please donate!
Post Reply
emarti
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 210
Joined: Sat May 07, 2005 8:24 pm
Location: Eskisehir, TURKEY
Contact:

wxScrollText class

Post by emarti »

Scrolling Text
Download sample & class
http://emarti.50webs.com/ScrollTextSample.zip

wxScrollText.h

Code: Select all

///////////////////////////////////////////////////////////////////////////////
// Name:		wxScrollText.h
// Purpose:     Scrolling Text
// Author:      emarti, Murat
- T U R K E Y ?
- I love this country!

WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/
emarti
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 210
Joined: Sat May 07, 2005 8:24 pm
Location: Eskisehir, TURKEY
Contact:

Post by emarti »

Screenshot

Image
- T U R K E Y ?
- I love this country!

WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/
User avatar
T-Rex
Moderator
Moderator
Posts: 1248
Joined: Sat Oct 23, 2004 9:58 am
Location: Zaporizhzhya, Ukraine
Contact:

Post by T-Rex »

Looks very neat. Good work! :)

But there are some memory leaks
Here are modified methods

Code: Select all

wxScrollText::~wxScrollText() 
{ 	
	wxDELETE(WxTimer);
	WxStaticText->Destroy();
} 

...

void ScrollTextSampleFrm::ScrollTextSampleFrmClose(wxCloseEvent& event)
{
	wxDELETE(WxTimer1);
	wxScrollText1->Destroy();
	wxScrollText2->Destroy();
	WxScrolledWindow1->Destroy();	
	Destroy();
}
Lamego
Earned some good credits
Earned some good credits
Posts: 101
Joined: Wed Jun 29, 2005 10:13 pm
Location: Portugal
Contact:

Linux Makefile

Post by Lamego »

Here is a Makefile to build it on Linux :

Code: Select all

CXX= g++
CXXFLAGS= `wx-config --cxxflags`
LIBS=`wx-config --libs`
SRCS = class/wxScrollText.cpp \
        ScrollTextSampleApp.cpp \
        ScrollTextSampleFrm.cpp

OBJS = ${SRCS:.cpp=.o}
.cpp.o:
        ${CXX} ${CXXFLAGS} -c $<
scroll: $(OBJS)
        ${CXX} ${CXXFLAGS} `find . -name "*.o"` ${LIBS}  -o $@
all:
        scroll
wxMSW 2.6.3 - GCC 3.4.2 (MinGW/MSYS)
wxGTK 2.6.3 - GCC 4.02 (Ubuntu)
Code::Blocks Win/Lin
PTlink Tech Admin
PTlink Chat Software Lead Developer
http://software.pt-link.net
HK
Earned a small fee
Earned a small fee
Posts: 14
Joined: Thu Apr 20, 2006 8:13 am
Location: China(Taiwan)

Post by HK »

Hii :oops: Lamego
I got some error message as :
[hk@localhost minimal]$ make -f mkh2.unx
mkh2.unx:10: *** missing separator (did you mean TAB instead of 8 spaces?). Stop.

but use the default make file is all right:

# by default, wx-config from the PATH is used
WX_CONFIG := wx-config

# set this to the name of the main executable file
PROGRAM = ScrollTextSampleApp

# if your program has more than one source file, add more .o files to the line
# below
OBJECTS = $(PROGRAM).o ScrollTextSampleFrm.o wxScrollText.o


# you shouldn't have to edit anything below this line
CXX = $(shell $(WX_CONFIG) --cxx)

.SUFFIXES: .o .cpp

.cpp.o :
$(CXX) -c `$(WX_CONFIG) --cxxflags` -o $@ $<

all: $(PROGRAM)

$(PROGRAM): $(OBJECTS)
$(CXX) -o $(PROGRAM) $(OBJECTS) `$(WX_CONFIG) --libs`

clean:
rm -f *.o $(PROGRAM)

Would you please to help me ?
Lamego
Earned some good credits
Earned some good credits
Posts: 101
Joined: Wed Jun 29, 2005 10:13 pm
Location: Portugal
Contact:

tabs

Post by Lamego »

The makefile syntax is:
RuleName: Dependencies
<TAB>Commmand
You are missing tabs below .cpp.o and $(PROGRAM): $(OBJECTS) .
wxMSW 2.6.3 - GCC 3.4.2 (MinGW/MSYS)
wxGTK 2.6.3 - GCC 4.02 (Ubuntu)
Code::Blocks Win/Lin
PTlink Tech Admin
PTlink Chat Software Lead Developer
http://software.pt-link.net
HK
Earned a small fee
Earned a small fee
Posts: 14
Joined: Thu Apr 20, 2006 8:13 am
Location: China(Taiwan)

Post by HK »

:wink:
THanks Lamego.
It works well.
Have a nice weekend.
Thanks again.
gururamnath
Super wx Problem Solver
Super wx Problem Solver
Posts: 466
Joined: Sat Sep 18, 2004 2:49 am
Location: California, USA

Post by gururamnath »

Can you please let me know why you are releasing this in GPL ? You dont want others to use it in Commercial project ? If this is an idealogical thing then I can understand.

-Guru Kathiresan
emarti
Filthy Rich wx Solver
Filthy Rich wx Solver
Posts: 210
Joined: Sat May 07, 2005 8:24 pm
Location: Eskisehir, TURKEY
Contact:

Post by emarti »

gururamnath wrote:Can you please let me know why you are releasing this in GPL ? You dont want others to use it in Commercial project ? If this is an idealogical thing then I can understand.

-Guru Kathiresan
Yeah, You can understand :). This class is your class. You can modify it.

Respectly,
emarti
- T U R K E Y ?
- I love this country!

WebSites:
http://mebt.sourceforge.net/
http://wxquran.sourceforge.net/
WxNoob
Earned a small fee
Earned a small fee
Posts: 15
Joined: Mon Jan 28, 2008 7:03 pm

Post by WxNoob »

emarti wrote:Screenshot

Image
I can
Post Reply