Page 1 of 1
wxScrollText class
Posted: Fri Apr 28, 2006 10:36 pm
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
Posted: Fri Apr 28, 2006 10:49 pm
by emarti
Screenshot

Posted: Sat Apr 29, 2006 12:44 pm
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();
}
Linux Makefile
Posted: Sat Apr 29, 2006 1:40 pm
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 [email protected]
all:
scroll
Posted: Wed May 03, 2006 1:15 pm
by HK
Hii

Lamego
I got some error message as :
[
[email protected] 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
[email protected] $<
all: $(PROGRAM)
$(PROGRAM): $(OBJECTS)
$(CXX) -o $(PROGRAM) $(OBJECTS) `$(WX_CONFIG) --libs`
clean:
rm -f *.o $(PROGRAM)
Would you please to help me ?
tabs
Posted: Wed May 03, 2006 1:47 pm
by Lamego
The makefile syntax is:
RuleName: Dependencies
<TAB>Commmand
You are missing tabs below .cpp.o and $(PROGRAM): $(OBJECTS) .
Posted: Thu May 04, 2006 2:13 pm
by HK
THanks Lamego.
It works well.
Have a nice weekend.
Thanks again.
Posted: Fri May 12, 2006 5:17 pm
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
Posted: Mon May 15, 2006 8:46 am
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
Posted: Mon Jan 28, 2008 7:22 pm
by WxNoob
emarti wrote:Screenshot

I can